Getting a fatal error
-
I have activated bp rewrites and tested with only buddypress active and I am getting the following fatal error
PHP Fatal error: Uncaught Error: Cannot use object of type stdClass as array in /home/melbour9/public_html/wp-content/plugins/bp-rewrites/src/bp-members/bp-members-invitations.php:39
Stack trace: #0 /home/melbour9/public_html/wp-includes/class-wp-hook.php(307): BP\Rewrites\bp_members_invitations_setup_nav('') #1 /home/melbour9/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #2 /home/melbour9/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #3 /home/melbour9/public_html/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(155): do_action('bp_setup_nav') #4 /home/melbour9/public_html/wp-includes/class-wp-hook.php(307): bp_setup_nav('') #5 /home/melbour9/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #6 /home/melbour9/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #7 /home/melbour9/public_html/wp-content/plugins/buddypress/bp-core/bp-core-dependency.php(267): do_action('bp_init') #8 /home/melbour9/public_html/wp-includes/class-wp-hook.php(307): bp_init('') #9 /home/melbour9/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #10 /home/melbour9/public_html/wp-includes/plugin.php(474): WP_Hook->do_action(Array) #11 /home/melbour9/public_html/wp-settings.php(587): do_action('init') #12 /home/melbour9/public_html/wp-config.php(112): require_once('/home/melbour9/...') #13 /home/melbour9/public_html/wp-load.php(50): require_once('/home/melbour9/...') #14 /home/melbour9/public_html/xmlrpc.php(31): require_once('/home/melbour9/...') #15 {main}
$main_nav = $bp->members->nav->get_primary( array( ‘slug’ => $parent_slug ), false );
$main_nav ius rturning the following onject but your code expects an array
stdClass Object ( [component_id] => invitations [name] => Invitations [slug] => invitations [link] => invitations/ [css_id] => invitations [show_for_displayed_user] => [position] => 80 [screen_function] => members_screen_send_invites [default_subnav_slug] => list-invites )
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Getting a fatal error’ is closed to new replies.