Attempt to read property “ID” on null
-
I get the following PHP warning (PHP 8.1):
Attempt to read property "ID" on null in /home/..../wp-content/plugins/dd-lastviewed/last-viewed.php on line 141'
Seems like it needs
if (isset($post) && $post !== null)
before
$this->currentPostId = is_singular() ? $post->ID : '';
Could you please let me know how this can be fixed?
- The topic ‘Attempt to read property “ID” on null’ is closed to new replies.