Before submitting an issue please check that you’ve completed the following steps:
Made sure you’re on the latest version ✅
Used the search feature to ensure that the bug hasn’t been reported before ✅
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:
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