-
Notifications
You must be signed in to change notification settings - Fork 220
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Argument 2 ($url) passed to exclude_rocket_from_wp_updates() must be of the type string #7042
Comments
The complete stack trace is in the ticket above |
another one: https://secure.helpscout.net/conversation/2740067797/518850?folderId=2008123 error stack
|
The same thing here on 3 websites after updating from 3.17.0.2 to 3.17.1 |
I think we have few instances where Scope a solution ✅We can add a nullable type hint to the
Estimate the effort ✅[XS] |
IMO, we should revert to what was there before: no typehint in the method declaration, and a check for |
I'm still experiencing this issue in the latest WP Rocket version (v3.17.2). Steps to reproduce the behavior: Just load the WP plugins page (/wp-admin/plugins.php) I'm getting the following error:
As a temporary workaround, I've edited the if ( ! is_string( $url ) ) {
return $request;
} However, after applying this fix, I encountered another fatal error, so I had to apply the same fix to the I hope this information is helpful in resolving this issue. |
Hello @salvia34 the issue is will be fixed in the 3.17.3 version of WP Rocket. The proposed fix can be seen here: |
…s() must be of the type string (#7059)
Related Issue: https://secure.helpscout.net/conversation/2756375620/521828/ |
Describe the bug
User reported the following error with version 3.17.1 (incomplete stack trace was provided):
Se ha producido un error del tipo E_ERROR en la línea 135 del archivo /home/customer/www/example.net/public_html/wp-content/plugins/wp-rocket/inc/Engine/Plugin/UpdaterSubscriber.php. Mensaje de error: Uncaught TypeError: Argument 2 passed to WP_Rocket\Engine\Plugin\UpdaterSubscriber::exclude_rocket_from_wp_updates() must be of the type string, null given, called in /home/customer/www/example.net/public_html/wp-includes/class-wp-hook.php on line 324 and defined in /home/customer/www/example.net/public_html/wp-content/plugins/wp-rocket/inc/Engine/Plugin/UpdaterSubscriber.php:135 Stack trace: #0 /home/customer/www/example.net/public_html/wp-includes/class-wp-hook.php(324): WP_Rocket\Engine\Plugin\UpdaterSubscriber->exclude_rocket_from_wp_updates(Array, NULL) #1 /home/customer/www/example.net/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #2 /home/customer/www/example.net/public_html/wp-includes/class-wp-http.php(234): apply_filters('http_request_ar...', Array, NULL) #3 /home/customer/www/example.net/public_html/wp-includes/class-wp-http.php(638): WP_Http->request(NULL, Array) #4 /home/customer/www/example.net/public_html/wp-includes/http.php(184): WP_Http->get(NULL, Array) #5 /h
It relates to this line:
wp-rocket/inc/Engine/Plugin/UpdaterSubscriber.php
Line 135 in ce7b601
I can see a recent update to the related method here:
7348869
https://imageshack.com/a/img922/4788/YNsWPZ.png
The change removed the check to make sure
$url
is a string, and it opens us up to errors like these.To Reproduce
Steps to reproduce the behavior:
$url
parameter to not be of typestring
.Expected behavior
We should check to confirm the
$url
parameter is astring
to prevent this error from happening.Additional context
Ticket - https://secure.helpscout.net/conversation/2737001255/518317
Slack - https://wp-media.slack.com/archives/C43T1AYMQ/p1729176825682779
The text was updated successfully, but these errors were encountered: