PHP Warning in display_post_states for PHP 8.0
-
Hi there,
We getting a lot of
PHP Warnings
in thedisplay_post_states()
function.The global $post isn’t always an instance of WP_Post which will trigger a warning in PHP. Asof PHP 8.0 this will become a problem.
Please considder updating the plugin for PHP 8.0 since PHP 7.4 is already EOL. The only updates PHP 7.4 is receiving are security-patches.
For suggestion, insert the following code after line 173 in tao-schedule-update.php:
// Return default states when $post isn't WP_Post if( ! $post instanceof \WP_Post ) { return $states; }
Cheers!
Erik-Jan
- The topic ‘PHP Warning in display_post_states for PHP 8.0’ is closed to new replies.