First of all, great plugin! I have combined the P2 Theme, P2 Resolved Posts plugin and Buddypress plugin for a ‘intranet’ site for my company. Everything works as it should, but it gives some errors on the BuddyPress pages (Activity, Groups, Members).
Warning: array_reverse() expects parameter 1 to be array, boolean given in ***/wp-content/plugins/p2-resolved-posts/p2-resolved-posts.php on line 410
Warning: Invalid argument supplied for foreach() in ***/wp-content/plugins/p2-resolved-posts/p2-resolved-posts.php on line 413
Both errors obviously related to line 408 with code:
$audit_logs = get_post_meta( get_the_id(), self::audit_log_key );
My wild guess is that P2 Resolved Posts is probably trying to load the post meta for the Buddypress custom post types, and it expects an array back.
My current workaround is just a simple
if(is_array())before the array_reverse on line 409 and ending after
echo $outputon line 417
But maybe there’s a better fix for this? Maybe something to prevent P2 Resolved posts from trying to load the post meta for BuddyPress post types?
- The topic ‘P2 Resolved Posts Buddypress errors’ is closed to new replies.