+44 (791) 5698 086

[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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Who are we?

Nabtron team includes web, desktop software and mobile apps developers along with SEO professionals.

We are available 24 hours, 7 days a week. Contact us now for anything you need!

Join our mailing list

Lets become friend :) What's your name & email?