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

preg_match(): Passing null to parameter #2 ($subject) when configuring custom menu items (PHP 8.1)

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78308-401
    • Hide
      1. Ensure you are testing with PHP 8.1 (except for Moodle 4.0, which doesn't support it. Moodle 4.0 can be tested with PHP 8.0)
      2. Log in as admin
      3. Navigate to Appearance > Theme settings in site administration
      4. Set Custom menu items to the following:

        0|http://blah1.com
        1|http://blah2.com
        |http://blah3.com
        

      5. Save changes
      6. Confirm there are no PHP deprecation notices on the page
      7. Confirm the navigation bar contains 0 (zero) and 1 (one) labelled links

       

      Show
      Ensure you are testing with PHP 8.1 (except for Moodle 4.0, which doesn't support it. Moodle 4.0 can be tested with PHP 8.0) Log in as admin Navigate to Appearance > Theme settings in site administration Set Custom menu items to the following: 0|http://blah1.com 1|http://blah2.com |http://blah3.com Save changes Confirm there are no PHP deprecation notices on the page Confirm the navigation bar contains 0 (zero) and 1 (one) labelled links  

      Environment:
      Moodle 4.1.3+
      PHP 8.1.19

      Steps:
      Set debug level to developer
      Enable debugdisplay
      Open any Moodle page

      Error:
      Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in [...]/lib/outputcomponents.php on line 3662

            pholden Paul Holden
            claud10r Claud10R
            Andrew Lyons Andrew Lyons
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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