Merge "Do not raise a PHP warning when session write fails"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Thu, 21 Jan 2016 15:12:18 +0000 (15:12 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Thu, 21 Jan 2016 15:12:18 +0000 (15:12 +0000)
includes/session/PHPSessionHandler.php

index 44d14cd..5344321 100644 (file)
@@ -238,10 +238,12 @@ class PHPSessionHandler {
 
                $session = $this->manager->getSessionById( $id, true );
                if ( !$session ) {
+                       // This can happen under normal circumstances, if the session exists but is
+                       // invalid. Let's emit a log warning instead of a PHP warning.
                        $this->logger->warning(
                                __METHOD__ . ": Session \"$id\" cannot be loaded, skipping write."
                        );
-                       return false;
+                       return true;
                }
 
                // First, decode the string PHP handed us