barrykooij / what-the-file

WordPress plugin: Find out what template file (PHP) is used on the current page. What The File will be visible in the Toolbar when viewing your website.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Notice: bbp_setup_current_user was called incorrectly.

grappler opened this issue · comments

I am not sure why I get this error when What The File is activated with bbPress. I am running PHP 5.5 and WP 3.9.1

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 /wp-includes/functions.php on line 3245

bbPress has this code

/**
 * Setup the currently logged-in user
 *
 * @since bbPress (r2695)
 * @uses did_action() To make sure the user isn't loaded out of order
 * @uses do_action() Calls 'bbp_setup_current_user'
 */
function bbp_setup_current_user() {

    // If the current user is being setup before the "init" action has fired,
    // strange (and difficult to debug) role/capability issues will occur.
    if ( ! did_action( 'after_setup_theme' ) ) {
        _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ), '2.3' );
    }

    do_action( 'bbp_setup_current_user' );
}

I think you're right, I'll give this plugin some love today.