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

/course/editcategory.php can produce a fatal error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 2.2
    • Administration, Navigation
    • None
    • MOODLE_22_STABLE

      If a user has a role that gives them enough permissions to see the Add and edit category buttons on a category page, when they try to use the page it can produce a Fatal error similar to:

      Fatal error: Call to a member function get() on a non-object in /var/www/html/course/editcategory.php on line 139

      How to reproduce:

      • Create a role that can be assigned at the Category level
      • Give the role the following two capabilities: moodle/category:manage and moodle/site:manageblocks (these seem to be the miminum permissions required to enable editing on Categories)
      • Enrol a user to this role on a category
      • Login to this page as the user, and turn editing on.
      • Click on either the 'Edit this category' or 'Add a sub-category' button. the error will now be generated.

      The error looks as though it will not occur only if a user can see the Site Administration -> Courses -> Add/edit courses node in the Settings block.

            rajeshtaneja Rajesh Taneja
            nmagill Neill Magill
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.