Title: Undefined property: stdClass::$post_status
Last modified: January 19, 2017

---

# Undefined property: stdClass::$post_status

 *  Resolved [Dawid](https://wordpress.org/support/users/davidcie/)
 * (@davidcie)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasspost_status/)
 * 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](https://wordpress.org/support/users/sasiddiqui/)
 * (@sasiddiqui)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasspost_status/#post-8686299)
 * Hi [@davidcie](https://wordpress.org/support/users/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](https://wordpress.org/support/users/davidcie/)
 * (@davidcie)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasspost_status/#post-8691882)
 * 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 9 years, 4 months ago by [Dawid](https://wordpress.org/support/users/davidcie/).
    -  This reply was modified 9 years, 4 months ago by [Dawid](https://wordpress.org/support/users/davidcie/).
 *  Plugin Author [Sami Ahmed Siddiqui](https://wordpress.org/support/users/sasiddiqui/)
 * (@sasiddiqui)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasspost_status/#post-8710096)
 * 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](https://wordpress.org/support/users/davidcie/)
 * (@davidcie)
 * [9 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasspost_status/#post-8712099)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/permalinks-customizer_fff1d5.svg)
 * [Permalinks Customizer](https://wordpress.org/plugins/permalinks-customizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/permalinks-customizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/permalinks-customizer/)
 * [Active Topics](https://wordpress.org/support/plugin/permalinks-customizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/permalinks-customizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/permalinks-customizer/reviews/)

 * 4 replies
 * 2 participants
 * Last reply from: [Dawid](https://wordpress.org/support/users/davidcie/)
 * Last activity: [9 years, 4 months ago](https://wordpress.org/support/topic/undefined-property-stdclasspost_status/#post-8712099)
 * Status: resolved