[Solved]Buddypress registration options plugin – Wrong datatype for second argument error

This post is meant to solve the error :

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /******/plugins/bp-registration-options/bp-registration-options.php on line 1594

I received this error when using bp registration options plugin with buddypress 1.5 on wordpress 3.3.

To fix this error, follow these steps:

1. Goto plugin editor and select bp-registration-options plugin

2. Select file bp-registration-options.php

3. in this file, find and replace these codes with:

find (line 6) :

 if ( !is_site_admin() )

replace with :

 if ( !is_super_admin() )

find (line 675) :

$is_bp_dir = $bp->root_components;

replace with :

$is_bp_dir = array_keys($bp->active_components);

find (1592) :

$is_bp_dir = $bp->root_components;

replace with :

$is_bp_dir = array_keys($bp->active_components);

This should fix the error.

If you’re having difficulty in applying this fix let me know if you need my services to do it for you!

Note: if you see a white blank screen or any error after applying this fix, don’t panic, simply close the window and open your wordpress admin backend again and it should be fine now.

hire best wordpress php css developer
Need Help? Hire me now!
I can help you in anything related to webdevelopment, including: HTML, CSS, PHP & MySql, WordPress (plugins & themes development, others), regular expressions, server management, etc.

Leave a Reply

Your email address will not be published.