PHP Warning no property of non-object
-
As of right now it seems vague and is definitely not a top priority but I did want to mention this warning I am getting.
I am getting 2 errors per post:
Notice: Trying to get property of non-object in wp-includes/post.php on line 6073 Notice: Trying to get property of non-object in wp-includes/post.php on line 6074
It occurs when using get_posts on a post type has been enabled as a taxonomy. Here is the code:
$posts = get_posts( array( 'post_type' => $post_type, 'post_status' => 'publish', 'suppress_filters' => false, 'posts_per_page' => -1 ) );
It goes away when I deactivate the cpt-onomies plugin so I know it is due to the plugin but I do not know why.
I will look into it when I have a chance but for now I have a deadline that will not be bothered by it. So after this project is done I will definitely help if you still need it.
- The topic ‘PHP Warning no property of non-object’ is closed to new replies.