Strange error
-
Hi there, I’m getting the following error code displaying on the plugin itself, in the placements tab: Warning: array_filter() expects parameter 1 to be array, bool given in /home/customer/www/website/public_html/wp-content/plugins/advanced-ads/src/Placement_Type.php on line 185
I tried to open a support ticket but got the message that they may not get back to me until the next workday which seems to be on Monday. I’d like to fix this issue before then if possible. I’ve gone through my plugins, theme, etc., to make sure everything was up to date. There is one plugin that is set to auto update in a few hours which I deactivated and tested.
No matter what I try I can’t seem to get this error message to go away, nor the ads to appear.
I uninstalled the all of the pro plugins, as well as the standard plugin. I then reinstalled the standard plugin, only, and still get this message. I reinstalled the necessary pro plugins and still get the message.
At first, it goes away after I make a change. Then, when I hit the save button it appears again.
This is what the code looks like from lines 182 to 191:
// check if the group has allowed ads.
$group_ads = array_filter( $group->get_all_ads(), function( \WP_Post $ad_post ) {
return $this->is_ad_type_allowed( ( new \Advanced_Ads_Ad( $ad_post->ID ) )->type );
} );
if ( empty( $group_ads ) ) {
continue;
}
$this->allowed_groups[ ‘group_’ . $group->id ] = $group->name;
}
If anyone has any ideas on how I can fix this issue I’d be very grateful.
The topic ‘Strange error’ is closed to new replies.