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

During install error handling contains error in get_striptags()

XMLWordPrintable

      During install the code invoked during error handling may cause an error so instead of showing the original exception it shows Exception - core\formatting::get_striptags(): Return value must be of type bool, null returned.

      Steps to reproduce this issue

      We'll need to deliberately break a web-based Moodle install to cause an exception.

      1. Set up a website for Moodle.
      2. Create an empty Moodle database, database user account and Moodledata folder.
      3. Go to the website URL and walk through the install pages to the Installation page showing the tables being created. Do not click Continue.
      4. Before clicking Continue:
        1. Run the SQL statement: DELETE FROM mdl_config WHERE name LIKE 'defaultpreference_%' OR name = 'formatstringstriptags'.
        2. Use the command line script to purge caches, for example, sudo -u apache php -f admin/cli/purge_caches.php.
      5. Click Continue to proceed to page /user/editadvanced.php?id=2.

      Expected results

      Coding error detected, it must be fixed by a programmer: Invalid property requested, or the property does not has a default value.

      More information about this error
      Debug info:
      Error code: codingerror
      Stack trace:

          line 924 of /lib/classes/user.php: coding_exception thrown
          line 301 of /user/editlib.php: call to core_user::get_property_default()
          line 153 of /user/editadvanced_form.php: call to useredit_shared_definition()
          line 217 of /lib/formslib.php: call to user_editadvanced_form->definition()
          line 155 of /user/editadvanced.php: call to moodleform->construct()

      Actual results

      Exception - core\formatting::get_striptags(): Return value must be of type bool, null returned
      Exception - core\formatting::get_striptags(): Return value must be of type bool, null returned

            leonstr Leon Stringer
            leonstr Leon Stringer
            Paul Holden Paul Holden
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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