Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for existence of post_type of posts #214

Closed
shadyvb opened this issue Feb 5, 2014 · 0 comments

Comments

Projects
None yet
1 participant
@shadyvb
Copy link
Contributor

commented Feb 5, 2014

Do not always assume that a new post's post_type exists / is registered.
ex:

wp_insert_post( array(
  'post_type' => 'non_registered_post_type'
) );

results in:

Notice: Trying to get property of non-object in /srv/www/wordpress-develop/src/wp-content/plugins/wp-stream/connectors/posts.php on line 144

Notice: Trying to get property of non-object in /srv/www/wordpress-develop/src/wp-content/plugins/wp-stream/connectors/posts.php on line 144
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.