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

Deprecated: function_exists(): Passing null to parameter of type string when building CSS (PHP 8.1)

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78055-401
    • Hide

      As a workaround, you can set a no-op extracsscallback function in your theme.

      $THEME->extrascsscallback = 'theme_mytheme_get_extra_scss';

      (THX to #jrchamp)

      Show
      As a workaround, you can set a no-op extracsscallback function in your theme. $THEME->extrascsscallback = 'theme_mytheme_get_extra_scss'; (THX to #jrchamp)
    • Hide
      1. Ensure you are testing with PHP 8.1
      2. Download the Snap theme version 4.0.7 (2023041100) to reproduce
        • Note there is another unrelated bug in the theme itself, we're only fixing the reported error here
      3. Copy snap/ directory from download to your site $CFG->dirroot/theme directory
      4. Run the following command to initialize Behat:

        $ php admin/tool/behat/cli/init.php -a
        

      5. Confirm there is no "Deprecated: function_exists(): Passing null to parameter #1" debugging displayed while building theme CSS for Snap (you can ignore the "file not found" error as mentioned above)
      Show
      Ensure you are testing with PHP 8.1 Download the Snap theme version 4.0.7 (2023041100) to reproduce Note there is another unrelated bug in the theme itself, we're only fixing the reported error here Copy snap/ directory from download to your site $CFG->dirroot/theme directory Run the following command to initialize Behat: $ php admin/tool/behat/cli/init.php -a Confirm there is no "Deprecated: function_exists(): Passing null to parameter #1" debugging displayed while building theme CSS for Snap (you can ignore the "file not found" error as mentioned above)

      The function_exists() in lib/outputlib.php shows a deprecation warning in PHP 8.1:

      Passing null to parameter #1 ($function) of type string is deprecated of in lib/outputlib.php on line 1606

            pholden Paul Holden
            rdebleu Renaat Debleu
            Andrew Lyons Andrew Lyons
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 31 minutes
                1h 31m

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