Log backtrace for "User::loadFromSession called before the end of Setup.php"
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 25 Jan 2016 18:00:00 +0000 (13:00 -0500)
committerBryanDavis <bdavis@wikimedia.org>
Mon, 25 Jan 2016 22:58:52 +0000 (22:58 +0000)
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

index 47e67e5..2fadd6b 100644 (file)
@@ -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;