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

Icons are not shown while using $CFG->debugusers

    XMLWordPrintable

    Details

    • Database:
      MySQL
    • Testing Instructions:
      Hide

      1/ Create a test user and note down the user ID, purge all caches
      2/ Add a "$CFG->debugusers = '[userid]';" to your config.php where [userid] is the id of the user just created.
      3/ Login to moodle using the test user and browse around ensuring that errors are not seen on each page

      Repeat with another user not in the debug users list.

      Show
      1/ Create a test user and note down the user ID, purge all caches 2/ Add a "$CFG->debugusers = ' [userid] ';" to your config.php where [userid] is the id of the user just created. 3/ Login to moodle using the test user and browse around ensuring that errors are not seen on each page Repeat with another user not in the debug users list.
    • Workaround:
      Hide

      Implement the change mentioned in the description

      Show
      Implement the change mentioned in the description
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE

      Description

      When using $CFG->debugusers in config.php icons are not shown, because an error occurs while loading an icon. When trying to load an icon like theme/image.php?theme=standard&image=i%2Fnavigationitem an error like Notice: Trying to get property of non-object in /www/data/LearnWebTest/htdocs/LearnWebTest/live_image/lib/weblib.php on line 2842 occurs.

      In libweblib.php:2840 insert and $USER != null

      function debugging($message = '', $level = DEBUG_NORMAL, $backtrace = null) {
          global $CFG, $USER, $UNITTEST;
       
          $forcedebug = false;
          if (!empty($CFG->debugusers) and $USER != null) {
              $debugusers = explode(',', $CFG->debugusers);
      		$forcedebug = in_array($USER->id, $debugusers);
          }

        Attachments

          Activity

            People

            Assignee:
            poltawski Dan Poltawski
            Reporter:
            super3d Claus A. Us.
            Peer reviewer:
            Andrew Davis
            Integrator:
            Eloy Lafuente (stronk7)
            Tester:
            Jason Fowler
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Fix Release Date:
              12/Mar/12