Probably a bug with PHP 8?
-
When access Site Health in Admin dashboard, get Critical error.
2021/09/20 09:39:48 [error] 1508848#0: *283968 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught TypeError: Unsupported operand types: string - int in /wp-admin/includes/class-wp-site-health.php:2502
I’ve checked the class-wp-site-health.php, line 2502 in function: has_missed_cron(), I think $cron->time – time() has triggered the error.
public function has_missed_cron() { if ( is_wp_error( $this->crons ) ) { return $this->crons; } foreach ( $this->crons as $id => $cron ) { if ( ( $cron->time - time() ) < $this->timeout_missed_cron ) { $this->last_missed_cron = $cron->hook; return true; } } return false; }
this also appears in the next function: has_late_cron().
Hope this can be fixed in the next release.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Probably a bug with PHP 8?’ is closed to new replies.