Trying to get property of non-object
-
Dear Support-Team!
I recently checked my website’s debug.log and have seen following entries:
PHP Notice: Trying to get property of non-object in <my-docroot>/wp-content/plugins/duplicate-post/duplicate-post-common.php on line 149
PHP Notice: Trying to get property of non-object in <my-docroot>/wp-content/plugins/duplicate-post/duplicate-post-common.php on line 123
Both if queries expect, that the $post variable has a property “post_type”.
But what if it hasn’t => if the post-id given in $_GET is no valid?
Please add a check to these 2 if queries so there is no debug.log output.
The page I need help with: [log in to see the link]
- The topic ‘Trying to get property of non-object’ is closed to new replies.