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' );
}
This could be too early:
https://github.com/barrykooij/what-the-file/blob/master/what-the-file.php#L74
I think you're right, I'll give this plugin some love today.