Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-17140

get_record error when creating a new user profile field

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.3
    • Fix Version/s: 1.9.4, 2.0
    • Component/s: Authentication
    • Labels:
      None
    • Affected Branches:
      MOODLE_19_STABLE
    • Fixed Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE

      Description

      when creating a new userprofile page the function define_save in definelib.php is called

      this line:
      $old = get_record('user_info_field', 'id', $data->id);

      causes an error as for new fields, $data->id doesn't exist. - should check !empty($data->id) before calling get_record

        Attachments

          Activity

            People

            Assignee:
            danmarsden Dan Marsden
            Reporter:
            danmarsden Dan Marsden
            Tester:
            Jérôme Mouneyrac
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              28/Jan/09