• Hi-

    We have two WordPress sites on the same server. One is multi-site.

    After upgrading plugins & themes to latest releases, we upgraded to WordPress 6.2. The single site behaves normally.

    Our multi-site WordPress instance behaves normally except for the Tools -> Site Health page. Attempting to reach that spawns the “There has been a critical error on this website” page. This is true for all four sites in the multi-site instance.

    The debug log shows:

    [04-Apr-2023 15:52:48 UTC] PHP Fatal error: Uncaught WpOrg\Requests\Exception\InvalidArgument: WpOrg\Requests\Cookie::__construct(): Argument #1 ($name) must be of type string, integer given in /var/www/[site_name]/wp-includes/Requests/src/Exception/InvalidArgument.php:29
    Stack trace:
    #0 /var/www/[site_name]/wp-includes/Requests/src/Cookie.php(83): WpOrg\Requests\Exception\InvalidArgument::create()
    #1 /var/www/[site_name]/wp-includes/class-wp-http.php(472): WpOrg\Requests\Cookie->__construct()
    #2 /var/www/[site_name]/wp-includes/class-wp-http.php(352): WP_Http::normalize_cookies()
    #3 /var/www/[site_name]/wp-includes/class-wp-http.php(634): WP_Http->request()
    #4 /var/www/[site_name]/wp-includes/http.php(162): WP_Http->get()
    #5 /var/www/[site_name]/wp-admin/includes/class-wp-site-health.php(2093): wp_remote_get()
    #6 /var/www/[site_name]/wp-admin/includes/class-wp-site-health.php(194): WP_Site_Health->get_test_rest_availability()
    #7 /var/www/[site_name]/wp-admin/includes/class-wp-site-health.php(139): WP_Site_Health->perform_tes in /var/www/[site_name]/wp-includes/Requests/src/Exception/InvalidArgument.php on line 29

    We disabled all plugins, switched to the twentytwentythree theme and the results were the same.

    Any guidance as to how we might cure this issue would be appreciated.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Try Settings > Permalinks and clicking the “Save Changes” button a few times. Do you still get the error?

    Thread Starter reggie3

    (@reggie3)

    Yes, the error persists. Other thoughts?

    Thanks!

    Thread Starter reggie3

    (@reggie3)

    Just as an update, we upgraded 14 plugins today on our multisite instance and continue to have this “critical error” with the Site Health page. Everything else okay.

    Hoping next WordPress core update cures this issue, but any insights in the mean time would be appreciated.

    Hi @reggie3 ,

    I happen to have a somewhat related bug. Do you have any cookie whose name looks like a regular number, ie “123”?

    Try to delete it (F12, Application, cookies, …) and try again.

    Thread Starter reggie3

    (@reggie3)

    Thanks for the thought, but no such cookie…

    The issue persists.

    ??

    Thanks!

    We had the exact same issue with the EWWW Optimizer plugin, and it turned out to be caused by an unnamed cookie. Deleting the cookie helped resolve the problem.

    PHP Fatal error: Uncaught WpOrg\Requests\Exception\InvalidArgument: WpOrg\Requests\Cookie::__construct(): Argument #1 ($name) must be of type string, integer given in

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PHP Fatal error – class-wp-site-health.php’ is closed to new replies.