WordPress.org

Ready to get started?Download WordPress

Forums

P2 Resolved Posts
P2 Resolved Posts + Buddypress errors (1 post)

  1. supertester
    Member
    Posted 1 year ago #

    Hi,

    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 $output on 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?

    http://wordpress.org/extend/plugins/p2-resolved-posts/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic