WordPress.org

Support

Support » Plugins and Hacks » wp_insert_post error, in_array wrong datatype for 2nd argument

wp_insert_post error, in_array wrong datatype for 2nd argument

  • Hello,

    This isn’t the first time I’m using wp_insert_post in plugins but this time I can’t make it work for the soul of me!

    The post is successfully inserted but once I’m trying to view or edit it I get these errors:

    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /path/wp-includes/post.php  on line 1997
    
    Warning: constant() [function.constant]: Couldn't find constant WP_POST_REVISIONS in /path/wp-includes/post.php on line 3714
    
    You can’t edit this post because it is in the Trash. Please restore it and try again.

    Any help wold be deeply and sincerely appreciated.

    Thanks.

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘wp_insert_post error, in_array wrong datatype for 2nd argument’ is closed to new replies.
Skip to toolbar