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

Can't subscribe other user to forum

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.1.7, 2.2.4
    • 2.3
    • Forum

      If you attempt to subscribe another user to a forum you produce the following stack trace:
      Debug info: Column 'userid' cannot be null
      INSERT INTO mdl_forum_subscriptions (userid,forum) VALUES(?,?)
      [array (
      0 => NULL,
      1 => '2',
      )]
      Error code: dmlwriteexception
      Stack trace:
      line 416 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 952 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 994 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 4560 of /mod/forum/lib.php: call to mysqli_native_moodle_database->insert_record()
      line 170 of /mod/forum/subscribe.php: call to forum_subscribe()
      Output buffer: <br /> <b>Notice</b>: Undefined property: stdClass::$id in <b>/html/mod/forum/subscribe.php</b> on line <b>134</b><br /> <br /> <b>Notice</b>: Undefined property: stdClass::$id in <b>/html/mod/forum/subscribe.php</b> on line <b>170</b><br />

      The $DB->get_record() call on line 65 includes only three parameters, so it never returns any fields. I'm not sure how to actually reach this code via the interface; I noticed the function call and worked backwards to produce the stack trace.

            cfulton Charles Fulton
            cfulton Charles Fulton
            Sam Hemelryk Sam Hemelryk
            Dan Poltawski Dan Poltawski
            Frédéric Massart Frédéric Massart
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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