X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fsession%2FSessionManager.php;h=9ca3bbc42d47df569dd36871ec24fbe248a71ac7;hb=1dd2acf48c2c3c10c196c968d79f75bf87ce1243;hp=0abec1be4ea66469f64d87bd835b713b2c1438ba;hpb=a85d1b9d0cd7f02111d3a647d5b91e3b1f334563;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/session/SessionManager.php b/includes/session/SessionManager.php index 0abec1be4e..9ca3bbc42d 100644 --- a/includes/session/SessionManager.php +++ b/includes/session/SessionManager.php @@ -168,7 +168,6 @@ final class SessionManager implements SessionManagerInterface { $store = $options['store']; } else { $store = \ObjectCache::getInstance( $this->config->get( 'SessionCacheType' ) ); - $store->setLogger( $this->logger ); } $this->store = $store instanceof CachedBagOStuff ? $store : new CachedBagOStuff( $store ); @@ -953,6 +952,15 @@ final class SessionManager implements SessionManagerInterface { * @return Session */ public function getSessionFromInfo( SessionInfo $info, WebRequest $request ) { + 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' ); + } else { + throw new \BadMethodCallException( 'Sessions are disabled for this entry point' ); + } + } + $id = $info->getId(); if ( !isset( $this->allSessionBackends[$id] ) ) {