Error on common/functions with WP 4.7.5
Hi, after the upgrade to WP 4.7.5 in the panels of Awesome Support (a plugin which uses post type) I get this error:
Warning: in_array() expects parameter 2 to be array, null given in /home/thenewsl/public_html/wp-content/plugins/bbpress/includes/common/functions.php on line 1446
with bbPress 2.5.12. On that line bbPress check a provate variable of $wp assuming it should be an array. Probably Awesome Support forces in some way that variable to not be an array. Anyway probably bbPress should add a check “is_array()”.
Here the line of commonn/functions.php
if ( in_array( ‘post_parent__in’, $wp->private_query_vars ) )
I’ve changed it to
if ( is_array($wp->private_query_vars) && in_array( ‘post_parent__in’, $wp->private_query_vars ) )
to remove the warning.
Thank you, Stefano.
- You must be logged in to reply to this topic.