• Resolved Dawid

    (@davidcie)


    Whenever I visit a post (as opposed to static page) with Permalinks Customized enabled I am greeted by the above PHP error. It seems that the query defined in permalinks-customizer.php:285 is not pulling the post_status column from wp_posts, ie. should have , $wpdb->posts.post_status appended to the SELECT statement so that the post_status field can be used on line 306.

    Am I correct or am missing or misconfigured something?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi @davidcie,

    Sorry, but i am not able to produce this error. Are you getting this error on every post or some specific posts?

    Regards,
    Sami

    Thread Starter Dawid

    (@davidcie)

    Thanks for looking into it. The error only shows if you have define('WP_DEBUG', true); in your wp-config.php. What’s important thou is that if you look at the SELECT statement carefully you will notice that the code cannot work correctly — since the post_status column is not pulled from the database, the field will never be correcly checked on line 306 (if ( $posts[0]->post_status == 'draft' )).

    Regards,
    Dawid

    • This reply was modified 8 years, 1 month ago by Dawid.
    • This reply was modified 8 years, 1 month ago by Dawid.
    Plugin Author Sami Ahmed Siddiqui

    (@sasiddiqui)

    Hi Dawid,

    Thanks for informing. I have checked and fixed the issue in the version 0.3.8.

    Let me know if you still facing the error.

    Thanks,
    Sami

    Thread Starter Dawid

    (@davidcie)

    The new update works just fine. Thank you for fixing the bug!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Undefined property: stdClass::$post_status’ is closed to new replies.