Skip to:
Content

bbPress.org

Ticket #2932: 2932.diff

File 2932.diff, 908 bytes (added by netweb, 6 years ago)
  • src/includes/core/sub-actions.php

     
    164164        // If the current user is being setup before the "init" action has fired,
    165165        // strange (and difficult to debug) role/capability issues will occur.
    166166        if ( ! isset( $GLOBALS['wp_customize'] ) && ! did_action( 'after_setup_theme' ) ) {
    167                 _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ), '2.3' );
     167                $e = new Exception;
     168                $trace = $e->getTraceAsString();
     169                _doing_it_wrong( __FUNCTION__, __( 'The current user is being initialized without using $wp->init().', 'bbpress' ) . "\n===\nTrace:\n" . substr( $trace, strpos( $trace, '#6' ) ) . "\n===\n", '2.3' );
    168170        }
    169171
    170172        do_action( 'bbp_setup_current_user' );