After updating to PHP 7 I get this warning:
Warning: in_array() expects parameter 2 to be array, null given
The code is refering to:
$post_type = WPAlchemy_MetaBox::_get_current_post_type();
if (isset($post_type) AND ! in_array($post_type, $this->types))
{
$can_output = FALSE;
}
// filter: output (can_output)
if ($this->has_filter('output'))
{
$can_output = $this->apply_filters('output', $post_id);
}
return $can_output;
And specifically this line:
if (isset($post_type) AND ! in_array($post_type, $this->types))
Which excatly is null? How can I fix this?