Moodle
  1. Moodle
  2. MDL-31428

Warnings subscribing/unsubscribing to forums with DEBUG_DEVELOPER enabled

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Eloy Lafuente (stronk7) added a comment -

            Sending to integration...ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Sending to integration...ciao
            Hide
            Aparup Banerjee added a comment -

            cool, integrated into 21, 22 and master.

            Show
            Aparup Banerjee added a comment - cool, integrated into 21, 22 and master.
            Hide
            Jason Fowler added a comment -

            All good

            Show
            Jason Fowler added a comment - All good
            Hide
            Eloy Lafuente (stronk7) added a comment -

            Many thanks for your collaboration, this code has been integrated upstream and it's available in all the repositories.

            Closing, ciao

            Show
            Eloy Lafuente (stronk7) added a comment - Many thanks for your collaboration, this code has been integrated upstream and it's available in all the repositories. Closing, ciao

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: