wp-media / wp-rocket

Performance optimization plugin for WordPress
https://wp-rocket.me
GNU General Public License v2.0
688 stars 215 forks source link

LCP / ATF / Critical Images - PHP Warning Undefined Property in Controller.php #6814

Closed joejoe04 closed 4 weeks ago

joejoe04 commented 1 month ago

Before submitting an issue please check that you’ve completed the following steps:

Describe the bug Some users are saying they see the following error in their logs:

PHP Warning: Undefined property: stdClass::$type in /data/sites/web/baniwafelsbe/www/wp-content/plugins/wp-rocket/inc/Engine/Media/AboveTheFold/Frontend/Controller.php on line 498; PHP message: PHP Warning: Undefined property: stdClass::$type in /data/sites/web/baniwafelsbe/www/wp-content/plugins/wp-rocket/inc/Engine/Media/AboveTheFold/Frontend/Controller.php on line 498;

To Reproduce

Expected behavior The error should not happen.

Additional context Ticket Slack

Acceptance Criteria (for WP Media team use only) Clear instructions for developers, to be added before the grooming

joejoe04 commented 1 month ago

Another case: https://secure.helpscout.net/conversation/2659666365/504064/

juricazuanovic commented 1 month ago

Another case: https://secure.helpscout.net/conversation/2658539384/503840/

sandyfigueroa commented 1 month ago

Another case: https://secure.helpscout.net/conversation/2664318212/504895