PHP Warning line 13 re $post_type
-
Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer ... /wp-content/plugins/wp-admin-hide-others-posts/wp-admin-hide-others-posts.php on line 13Just a heads up that a client of mine was receiving the following warning.
I fixed it by quoting the $post_type e.g.
public static function filter_post_type($post_type){ return array_key_exists("$post_type", get_option('wp_hide_others_posts_enabled')); }That seems to stop it throwing the warning.
Thanks for such a great plugin btw 🙂
The topic ‘PHP Warning line 13 re $post_type’ is closed to new replies.