From c00d0b5d94c946b8883dd7062bf7160a199aa5c2 Mon Sep 17 00:00:00 2001 From: Brad Jorsch Date: Mon, 25 Jan 2016 13:00:00 -0500 Subject: [PATCH] Log backtrace for "User::loadFromSession called before the end of Setup.php" Fixing the bug will be much easier if we know where it's being called from. Bug: T124367 Change-Id: I69cd8bc2bb0677819763c59a221f098d564c92cd --- includes/user/User.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/user/User.php b/includes/user/User.php index 47e67e5601..2fadd6b05f 100644 --- a/includes/user/User.php +++ b/includes/user/User.php @@ -327,7 +327,9 @@ class User implements IDBAccessObject { // If this is called too early, things are likely to break. if ( $this->mFrom === 'session' && empty( $wgFullyInitialised ) ) { \MediaWiki\Logger\LoggerFactory::getInstance( 'session' ) - ->warning( 'User::loadFromSession called before the end of Setup.php' ); + ->warning( 'User::loadFromSession called before the end of Setup.php', array( + 'exception' => new Exception( 'User::loadFromSession called before the end of Setup.php' ), + ) ); $this->loadDefaults(); $this->mLoadedItems = $oldLoadedItems; return; -- 2.20.1