• VGJ

    (@vgj)


    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.

    • This topic was modified 8 years ago by VGJ.
Viewing 5 replies - 1 through 5 (of 5 total)
  • uiux

    (@uiux)

    HI, I am also getting this error.

    Nothing special happening, same conditions as above

    shshaw

    (@shshaw)

    Also receiving this notice. Seems that WordPress is getting an array without any term objects in it from get_object_term_cache on line 6070 of posts.php

    Also receiving this notice. Posting so that I can get notified by replies that provide fix(es).

    I get the same errors. Has anybody found a solution?

    ( ! ) Notice: Trying to get property of non-object in D:\www\STEFANO\woptimize.io\wp-includes\post.php on line 6080
    ( ! ) Notice: Trying to get property of non-object in D:\www\STEFANO\woptimize.io\wp-includes\post.php on line 6081

    • This reply was modified 7 years, 9 months ago by s.
    • This reply was modified 7 years, 9 months ago by s.
    • This reply was modified 7 years, 9 months ago by s.

    Nope. Logged this issue a few months back on the GIT for the code, got some way to debugging it but no solution by anyone so far.

    https://github.com/bamadesigner/cpt-onomies/issues/26

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Warning no property of non-object’ is closed to new replies.