SessionManager: Change behavior of getSessionById()
[lhc/web/wiklou.git] / includes / WebRequest.php
index 7306105..2c14618 100644 (file)
@@ -655,7 +655,10 @@ class WebRequest {
         */
        public function getSession() {
                if ( $this->sessionId !== null ) {
-                       return SessionManager::singleton()->getSessionById( (string)$this->sessionId, false, $this );
+                       $session = SessionManager::singleton()->getSessionById( (string)$this->sessionId, true, $this );
+                       if ( $session ) {
+                               return $session;
+                       }
                }
 
                $session = SessionManager::singleton()->getSessionForRequest( $this );