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

Error Passing null to parameter #2 ($string) when editing database entry with empty checkbox

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-81320-403
    • Hide
      1. Log in as admin
      2. Create a course
      3. Create a database
      4. Add a checkbox field with, at least, a couple of options.
      5. Add a short text field.
      6. Add an entry to the database, leaving the checkbox empty and adding anything to the short text field.
      7. Edit the database entry
      8. Confirm there are no errors regarding:

        Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /opt/moodle/master/src/mod/data/field/checkbox/field.class.php on line 63
        

      9. Check one of the checkboxes and save
      10. Edit the entry again
      11. Confirm the same checkbox is still checked
      Show
      Log in as admin Create a course Create a database Add a checkbox field with, at least, a couple of options. Add a short text field. Add an entry to the database, leaving the checkbox empty and adding anything to the short text field. Edit the database entry Confirm there are no errors regarding: Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /opt/moodle/master/src/mod/data/field/checkbox/field.class.php on line 63 Check one of the checkboxes and save Edit the entry again Confirm the same checkbox is still checked

      Steps to reproduce

      1. Create a database
      2. Add a checkbox field with, at least, a couple of options.
      3. Add a short text field.
      4. Add an entry to the database, leaving the checkbox empty and adding anything to the short text field.
      5. Edit the database entry

      Expected result

      The entry can be edited.

      Current result

      The following error is displayed:

       

      explode(): Passing null to parameter #2 ($string) of type string is deprecated
      Whoops\Exception\ErrorException 
      .../mod/data/field/checkbox/field.class.php63
       explode
      .../mod/data/field/checkbox/field.class.php63
      data_field_checkbox display_add_field
      .../mod/data/classes/template.php1000
      mod_data\template get_field_input
      .../mod/data/classes/template.php926
      mod_data\template parse_add_entry
      .../mod/data/edit.php200
      

       

            pholden Paul Holden
            sarjona Sara Arjona (@sarjona)
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Huong Nguyen Huong Nguyen
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 46 minutes
                46m

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