Log a backtrace with "sessions are supposed to be disabled" message
authorBrad Jorsch <bjorsch@wikimedia.org>
Wed, 9 Mar 2016 17:00:06 +0000 (12:00 -0500)
committerBryanDavis <bdavis@wikimedia.org>
Wed, 9 Mar 2016 18:07:41 +0000 (18:07 +0000)
Bug: T127233
Change-Id: I27ca561ab5967cde270f2b665b51da687f0c081a

includes/session/SessionManager.php

index efa3445..0a304a9 100644 (file)
@@ -974,7 +974,9 @@ final class SessionManager implements SessionManagerInterface {
                if ( defined( 'MW_NO_SESSION' ) ) {
                        if ( MW_NO_SESSION === 'warn' ) {
                                // Undocumented safety case for converting existing entry points
-                               $this->logger->error( 'Sessions are supposed to be disabled for this entry point' );
+                               $this->logger->error( 'Sessions are supposed to be disabled for this entry point', [
+                                       'exception' => new \BadMethodCallException( 'Sessions are disabled for this entry point' ),
+                               ] );
                        } else {
                                throw new \BadMethodCallException( 'Sessions are disabled for this entry point' );
                        }