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

Warnings subscribing/unsubscribing to forums with DEBUG_DEVELOPER enabled

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1.4, 2.2.1, 2.3
    • Fix Version/s: 2.1.5, 2.2.2
    • Component/s: Forum
    • Labels:
    • Testing Instructions:
      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
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      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

              • Assignee:
                stronk7 Eloy Lafuente (stronk7)
                Reporter:
                stronk7 Eloy Lafuente (stronk7)
                Integrator:
                Aparup Banerjee
                Tester:
                Jason Fowler
                Participants:
                Component watchers:
                Andrew Nicols, Mathew May, Michael Hawkins, Shamim Rezaie, Simey Lameze
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

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