Skip to:
Content

bbPress.org


Ignore:
Timestamp:
05/31/2016 08:11:41 AM (6 years ago)
Author:
netweb
Message:

General: Add debug trace to bbp_setup_current_user() notice.

Previously, the bbp_setup_current_user was called incorrectly notice would not output any useful info for developers.

This commit adds a debug trace so developers are able to determine
whereabouts in the codebase this notice is originating from.

Props r-a-y
Fixes #2932

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/core/sub-actions.php

    r5951 r6046  
    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
Note: See TracChangeset for help on using the changeset viewer.