PHP fatal error potentially related to ATF and picture tags #6661
Labels
module: OCI
Optimize Critical Images
needs: environment
needs: r&d
Needs research and development (R&D) before a solution can be proposed and scoped.
priority: medium
Issues which are important, but no one will go out of business.
severity: major
Feature is not working as expected and no work around available
type: bug
Indicates an unexpected problem or unintended behavior
Milestone
Before submitting an issue please check that you’ve completed the following steps:
Describe the bug
After upgrading to version 3.16, user reported site went down and the following error was logged:
"PHP Fatal error: Uncaught TypeError: ltrim(): Argument #1 ($string) must be of type string, null given in /www/creatureartteacherlive_491/public/wp-content/plugins/wp-rocket/inc/Engine/Media/AboveTheFold/Frontend/Controller.php:222 Stack trace: #0 /www/creatureartteacherlive_491/public/wp-content/plugins/wp-rocket/inc/Engine/Media/AboveTheFold/Frontend/Controller.php(222): ltrim(NULL, '/') #1 [internal function]: WP_Rocket\Engine\Media\AboveTheFold\Frontend\Controller->WP_Rocket\Engine\Media\AboveTheFold\Frontend\{closure}(false) #2 /www/creatureartteacherlive_491/public/wp-content/plugins/wp-rocket/inc/Engine/Media"
In the Slack discussion, Remy said he thought it may be related to:
Expected behavior
The error should not occur for all valid <picture> tag markup.
Additional context
Ticket - https://secure.helpscout.net/conversation/2605875796/493242/
Website - https://creatureartteacher.com
Slack - https://wp-media.slack.com/archives/C43T1AYMQ/p1716485105461249
Acceptance Criteria (for WP Media team use only)
Clear instructions for developers, to be added before the grooming
The text was updated successfully, but these errors were encountered: