Fixing the bug will be much easier if we know where it's being called
from.
Bug: T124367
Change-Id: I69cd8bc2bb0677819763c59a221f098d564c92cd
// 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;