Title: Pro, Declaration bug?
Last modified: August 30, 2016

---

# Pro, Declaration bug?

 *  Resolved [jacipetersilie](https://wordpress.org/support/users/jacipetersilie/)
 * (@jacipetersilie)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pro-declaration-bug/)
 * Hello,
 * I am running pro and I get these 3 debug notifications, do you have a hint how
   to fix this?
 * “Strict Standards: Declaration of SP_BPCPM_MenuItemComponent::setup_globals()
   should be compatible with BP_Component::setup_globals($args = Array) in /nas/
   wp/www/cluster-41320/spiritberlin/wp-content/plugins/bp-custom-profile-menu-pro/
   SP_BPCPM_MenuComponent.php on line 21
 * Strict Standards: Declaration of SP_BPCPM_MenuItemComponent::setup_nav() should
   be compatible with BP_Component::setup_nav($main_nav = Array, $sub_nav = Array)
   in /nas/wp/www/cluster-41320/spiritberlin/wp-content/plugins/bp-custom-profile-
   menu-pro/SP_BPCPM_MenuComponent.php on line 21
 * Strict Standards: Declaration of SP_BPCPM_MenuItemComponent::setup_admin_bar()
   should be compatible with BP_Component::setup_admin_bar($wp_admin_nav = Array)
   in /nas/wp/www/cluster-41320/spiritberlin/wp-content/plugins/bp-custom-profile-
   menu-pro/SP_BPCPM_MenuComponent.php on line 21″
 * Thank you very much,
    Jacob
 * [https://wordpress.org/plugins/buddypress-custom-profile-menu/](https://wordpress.org/plugins/buddypress-custom-profile-menu/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [sensibleplugins](https://wordpress.org/support/users/sensibleplugins/)
 * (@sensibleplugins)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pro-declaration-bug/#post-6635352)
 * Hi Jacob,
 * I believe these warnings should be fixed if you change the function names from
 * ‘SP_BPCPM_MenuItemComponent::setup_globals()’
    to ‘SP_BPCPM_MenuItemComponent::
   setup_globals($args = Array)’
 * We’ll working on fixing that at our side too for our next release. Thanks!
 *  Thread Starter [jacipetersilie](https://wordpress.org/support/users/jacipetersilie/)
 * (@jacipetersilie)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pro-declaration-bug/#post-6635407)
 * Hello,
 * Thank you!!
 * Can you just quickly help me – I cannot find ‘SP_BPCPM_MenuItemComponent::setup_globals()’
   in SP_BPCPM_MenuComponent.php using CTRL+F.
 * Best wishes,
    Jacob
 *  Plugin Author [sensibleplugins](https://wordpress.org/support/users/sensibleplugins/)
 * (@sensibleplugins)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pro-declaration-bug/#post-6635562)
 * Oh the method is only called ‘setup_globals()’. ‘SP_BPCPM_MenuItemComponent::
   setup_globals()’ is just an indication that the method exists inside the SP_BPCPM_MenuItemComponent
   class.
 * Hope this helps.
    Tarek
 *  Thread Starter [jacipetersilie](https://wordpress.org/support/users/jacipetersilie/)
 * (@jacipetersilie)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/pro-declaration-bug/#post-6635567)
 * All right, thanks Tarek!!
 *  [damienoneill2001](https://wordpress.org/support/users/damienoneill2001/)
 * (@damienoneill2001)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/pro-declaration-bug/#post-6635737)
 * Hi Tarek,
 * Sorry to jump in on this post, but could you direct me to where I need to make
   the above change please?
 * I went into the plugins/bp-custom-profile-menu-pro/SP_BPCPM_MenuComponent.php
   file, scrolled down to line 158 where it has:
 *     ```
       function setup_globals() {
   
               $globals = array();
   
               parent::setup_globals( $globals );
           }
       ```
   
 * I then change `setup_globals()` to `setup_globals($args = Array)` but I get an
   error of:
 * Parse error: syntax error, unexpected ‘)’, expecting ‘(‘ in /var/www/vhosts/42/
   389622/webspace/httpdocs/adopt.hatchmedia.ie/wp-content/plugins/buddypress-custom-
   profile-menu/SP_BPCPM_MenuComponent.php on line 158
 * Where am I going wrong with this?
 * Cheers
 * Damien
 *  [damienoneill2001](https://wordpress.org/support/users/damienoneill2001/)
 * (@damienoneill2001)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/pro-declaration-bug/#post-6635738)
 * Ok, have it.
 * For those wondering:
 * On Line 158, change
    `function setup_globals() {` to `function setup_globals(
   $args = array()) {`
 * On Line 170, change
    `function setup_nav() {` to `function setup_nav($main_nav
   = array(), $sub_nav = array()) {`
 * On Line 193, change
    `function setup_admin_bar() {` to `function setup_admin_bar(
   $wp_admin_nav = array()) {`
 * That should sort it if you need to fix the issues before the update is released.
 * Damien

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Pro, Declaration bug?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/buddypress-custom-profile-menu_cab8ab.
   svg)
 * [BuddyPress Custom Profile Menu](https://wordpress.org/plugins/buddypress-custom-profile-menu/)
 * [Support Threads](https://wordpress.org/support/plugin/buddypress-custom-profile-menu/)
 * [Active Topics](https://wordpress.org/support/plugin/buddypress-custom-profile-menu/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/buddypress-custom-profile-menu/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/buddypress-custom-profile-menu/reviews/)

## Tags

 * [declaration](https://wordpress.org/support/topic-tag/declaration/)

 * 6 replies
 * 3 participants
 * Last reply from: [damienoneill2001](https://wordpress.org/support/users/damienoneill2001/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/pro-declaration-bug/#post-6635738)
 * Status: resolved