Warning: in_array() expects parameter 2 to be array, null given in /plugins/buddypress/bp-core/bp-c

I installed Multisite Shared Menu and all works well on main domain and six of my seven sub-domains, but on my Dating Service, when a logged in member clicks on "Members" we get a list of about a dozen lines of the same warning:

Warning: in_array() expects parameter 2 to be array, null given in /plugins/buddypress/bp-core/bp-core-filters.php on line 199

See screenshot at the bottom of this ticket.

I am using WP 4.8, BP 2.8.2, GeneratePress Child Theme, but the issue is also there using Twenty-Sixteen.

I deleted and reinstalled BuddyPress plugin but it didn't help.

I have contacted support forums for Multisite Shared Menu plugin and for BuddyPress but am not getting any responses.

I have deactivated the Multisite Shared Menu plugin for now on the Dating sub-domain since this is an active website. I don't mind if you want to activate it for testing, but please don't leave it activated unless you can fix it.

Can you give me some idea of how I might fix this problem please.

Support Access is granted. Thank you!

  • Adam Czajczyk
    • Support Gorilla

    Helo Mary,

    I hope you’re well today and thank you for your question!

    I checked your site and I noticed that the dating site is the one where BuddyPress is implemented. The issue here is a conflict because these two plugins try to extend the way the WP menus are handled. While the BuddyPress is available from other sites of your Multisite, its core is on that dating site – that’s why this happens only on this one.

    I was able to replicate this on my end and examined the code reported in error message. As a solution, add this line to the “functions.php” file of your theme that is used on the dating site. Put this line at the end of the file and see if that helps (it seems to be fixing that on my end):

    bp_remove_all_filters( 'page_css_class', 10 );

    I hope that helps!

    Best regards,


  • Mary
    • Wisp of the WP Loop

    Thank you Adam. I don’t have a special functions.php for the Dating Site so I put it in the main functions.php, and it didn’t work.

    Do I need to create a file in the specific Dating site? i.e. should I upload the multisite child theme plugin? I have used it on another of my sites.

  • Predrag Dubajic
    • Support

    Hi Mary,

    You can create new child theme for your Dating site and in that child theme functions.php file add the above code.

    Or you can try with adding below code as mu-plugin:

    function fix_bb_bp_warning() {
    $current_site = get_current_site();
    if ( $current_site = XX ) {
    bp_remove_all_filters( 'page_css_class', 10 );
    add_action( 'wp_head', 'fix_bb_bp_warning' );

    Just replace XX with the ID of your Dating subsite.

    Best regards,


  • Adam Czajczyk
    • Support Gorilla

    Hello Mary,

    The fact that it didn’t work on your setup suggests that there’s something more to it. While I was able to fully replicate the issue on my end and proposed solutions fixed it, we need to notice that my setup is a bit different and simpler than yours. This means that there might be some additional aspect that I overlooked because it’s specific to your site.

    That being said, I’ll be more than happy to assist you further with this but it would be easier for me if I could access files of your site directly. Could you please provide me with either FTP or cPanel access?

    You can simply put credentials (hostname, username, password and/or cPanel login URL, username and password) into the text field on “WPMU DEV -> Support” page in your site’s network admin area, just below the support access button. It won’t get posted anywhere in public and I’ll be able to make use of it after accessing your site.

    I’ll then examine the issue again on your setup and I hope this will let me find the solution that will work for you too.

    Let me know please when I can continue with FTP and/or cPanel access.

    Best regards,


  • Mary
    • Wisp of the WP Loop

    Thank you so much dear Adam. I have sent the credentials, thinking it was for the 301 redirect wildcard issue, however this situation has been resolved by my Systems Admin so we can close the ticket.

    He says: To resolve the issue I had to modify file “/plugins/buddypress/bp-core/bp-core-filters.php”

    Thank you again for your kind offer to help. I will now close the ticket.

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.