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

Calendar: creating a course event fails with dmlreadexception

    XMLWordPrintable

    Details

      Description

      When you try to create a course event and leave the form as is without filling it up, you will get dmlreadexception error.

      1. Login as admin 
      2. Navigate to a course and it's calendar
      3. Click New event button
      4. Don't change anything in the form and click Save.
      5. You will get dmlreadexception error.

      ERROR:  invalid input syntax for integer: "Array"
      SELECT * FROM mdl_course WHERE id = $1
      [array (
        0 => 
        array (
          0 => 2,
        ),
      )]
      Error code: dmlreadexception
      * line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
      * line 242 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      * line 778 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      * line 1571 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
      * line 1543 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      * line 1522 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      * line 131 of /calendar/classes/local/event/forms/create.php: call to moodle_database->get_record()
      * line 590 of /lib/formslib.php: call to core_calendar\local\event\forms\create->validation()
      * line 526 of /lib/formslib.php: call to moodleform->validate_defined_fields()
      * line 3579 of /calendar/lib.php: call to moodleform->is_validated()
      * line 7666 of /lib/moodlelib.php: call to calendar_output_fragment_event_form()
      * line 415 of /lib/external/externallib.php: call to component_callback()
      * line 228 of /lib/externallib.php: call to core_external::get_fragment()
      * line 59 of /lib/ajax/service.php: call to external_api::call_external_function()
      

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  9/Jul/18

                  Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 30 minutes
                  30m