Skip to:
Content
Pages
Categories
Search
Top
Bottom

Receiving “Notice” in back-end for set_current_user hook


  • Tonya Mork
    Participant

    @hellofromtonya

    Hey bbPress Gang,

    I just wanted to report a minor issue of a Notice that is being thrown for the hook in actions.php on line 48:

    add_action( 'set_current_user', 'bbp_setup_current_user', 10 );

    I handled it in the core plugin like this:

    add_action( 'plugins_loaded', function() {
    remove_action( 'set_current_user', 'bbp_setup_current_user', 10 );
    add_action( 'wp_set_current_user', 'bbp_setup_current_user', 10 );
    });

    For your issues team, here is the notice:

    Notice: bbp_setup_current_user was called incorrectly. The current user is being initialized without using $wp->init(). Please see Debugging in WordPress for more information. (This message was added in version 2.3.) in /Users/tonya/Sites/sandbox/wp-includes/functions.php on line 3560

    Looking at set_current_user, it was depreciated.

    Cheers! </>
    Tonya

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar