Upgrade Error: in_array() expects parameter 2 to be array
-
I’ve been using this code in some widgets for about a year now with no issues:
if ( !in_array(39,get_post_ancestors($post)) && !in_array(42,get_post_ancestors($post)) ) return true;
And also this one:
global $post; return (in_array(39,get_post_ancestors($post)));
All it does is display the widget if WordPress is displaying a particular post or one of its children.
But now I’m suddenly seeing a whole bunch of these errors at the top of every page:
Warning: in_array() expects parameter 2 to be array, boolean given in /home/besthome/public_html/wp-content/plugins/widget-logic/widget_logic.php(284) : eval()’d code on line 1
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Upgrade Error: in_array() expects parameter 2 to be array’ is closed to new replies.