Support » Plugin: BuddyPress Custom Profile Menu » Pro, Declaration bug?

  • Resolved jacipetersilie

    (@jacipetersilie)


    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/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author sensibleplugins

    (@sensibleplugins)

    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!

    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

    (@sensibleplugins)

    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

    All right, thanks Tarek!!

    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

    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.