Guard against PHP 8.0.0 and higher versions: count() throwing fatal error on invalid countable types passed to the value parameter #5407
Labels
module: preload
priority: high
Issues which should be resolved as quickly as possible
severity: critical
Defect that prevents the testing/use of the software
type: bug
Indicates an unexpected problem or unintended behavior
Milestone
Before submitting an issue please check that you’ve completed the following steps:
yes - Made sure you’re on the latest version
yes - Used the search feature to ensure that the bug hasn’t been reported before
Describe the bug
A fatal error happens on WP 6.0.2 / PHP 8.1.9 / WPR 3.12.0.5 if the
$_GET
value is null here:wp-rocket/inc/Engine/Preload/Subscriber.php
Line 188 in 6e499c2
Per @engahmeds3ed :
this is the error:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
We should guard against this error.
Additional context
Tickets:
https://secure.helpscout.net/conversation/1997531112/365760?folderId=377611
https://secure.helpscout.net/conversation/2003166039/367167?folderId=273766
Slack thread:
https://wp-media.slack.com/archives/C43T1AYMQ/p1662646309671649
Backlog Grooming (for WP Media dev team use only)
The text was updated successfully, but these errors were encountered: