Make WordPress Core

Changes between Initial Version and Version 3 of Ticket #58221


Ignore:
Timestamp:
04/28/2023 09:15:14 PM (21 months ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #58221

    • Property Keywords php8 added
  • Ticket #58221 – Description

    initial v3  
    11On line 2802 and 2828 of wp-admin/includes/class-wp-site-health.php, $cron->time - time() is not automatically cast by PHP version 8.1.2 from the String $cron->time to an integer to perform the arithmetic. Forcing the cast with (int) $cron->time - time() corrects the critical error, detailed below, that prevented the site health dashboard from loading.
    2 
     2{{{
    332023-04-28T16:27:37+00:00 CRITICAL Uncaught TypeError: Unsupported operand types: string - int in /var/www/toddlahman.com/wp-admin/includes/class-wp-site-health.php:2802
    44Stack trace:
     
    1313#8 {main}
    1414  thrown in /var/www/toddlahman.com/wp-admin/includes/class-wp-site-health.php on line 2802
     15}}}