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

Warnings subscribing/unsubscribing to forums with DEBUG_DEVELOPER enabled

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.1.4, 2.2.1, 2.3
    • 2.1.5, 2.2.2
    • Forum
    • MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • MOODLE_21_STABLE, MOODLE_22_STABLE
    • Hide

      0) Enable debug developer by setting, in config.php:

      $CFG->debug = 38911;
      $CFG->xmlstrictheaders = false;
      $CFG->debugdisplay = true;

      1) Log to your site, go to any course and then, forum

      2) try to subscribe yourself (you must be enrolled in the course to see the option in the settings menu).

      3) TEST: One message: "USER will receive copies of 'FORUM' by email is shown, followed by one redirect to the forum page. Both USER and FORUM are the names of the user and the forum.

      4) Repeat steps 2 & 3 but with the "unsubscribe" option. The only difference is that the message says: "... will NOT receive..."

      Ciao

      Show
      0) Enable debug developer by setting, in config.php: $CFG->debug = 38911; $CFG->xmlstrictheaders = false; $CFG->debugdisplay = true; 1) Log to your site, go to any course and then, forum 2) try to subscribe yourself (you must be enrolled in the course to see the option in the settings menu). 3) TEST: One message: "USER will receive copies of 'FORUM' by email is shown, followed by one redirect to the forum page. Both USER and FORUM are the names of the user and the forum. 4) Repeat steps 2 & 3 but with the "unsubscribe" option. The only difference is that the message says: "... will NOT receive..." Ciao

    Description

      Discovered while testing MDL-31081

      With DEBUG_DEVELOPER enabled, these warnings are shown each time one user tries to subscribe / unsubscribe one forum:

      Warning: Attempt to assign property of non-object in mod/forum/subscribe.php on line 130
      Warning: Attempt to assign property of non-object in mod/forum/subscribe.php on line 131

      It seems to be a simple matter of instantiating the object before accessing to it. Doing.

      Ciao

      Attachments

        Issue Links

          Activity

            People

              stronk7 Eloy Lafuente (stronk7)
              stronk7 Eloy Lafuente (stronk7)
              Aparup Banerjee Aparup Banerjee
              Jason Fowler Jason Fowler
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                12/Mar/12