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

Notice in restorelib - Undefined variable $category

    XMLWordPrintable

    Details

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

      Description

      The first if means that $category can be undefined which causes a notice at the second. That should be an empty() probably.

      637 // first try to get it from restore
      638 if ($restore->restore_restorecatto)

      { 639 $category = get_record('course_categories', 'id', $restore->restore_restorecatto); 640 }


      641
      642 // else we try to get it from the xml file
      643 //Now calculate the category
      644 if (!$category) {

        Attachments

          Activity

            People

            Assignee:
            howardsmiller Howard Miller
            Reporter:
            howardsmiller Howard Miller
            Tester:
            Dongsheng Cai Dongsheng Cai
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias, Sujith Haridasan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              11/Jul/08