Remove useless condition in SessionHandler::createLegacySession()
authorTim Düsterhus <duesterhus@woltlab.com>
Thu, 11 Mar 2021 08:28:08 +0000 (09:28 +0100)
committerTim Düsterhus <duesterhus@woltlab.com>
Thu, 11 Mar 2021 08:28:08 +0000 (09:28 +0100)
The default value is `null`, so we can set that explicitly.

wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index 94edee86fdacf8e5b51385c4cedf24e3f568a793..49936cb2752772a70e0790f10366f11aa5f91179 100644 (file)
@@ -716,12 +716,9 @@ final class SessionHandler extends SingletonFactory
             'lastActivityTime' => TIME_NOW,
             'requestURI' => UserUtil::getRequestURI(),
             'requestMethod' => !empty($_SERVER['REQUEST_METHOD']) ? \substr($_SERVER['REQUEST_METHOD'], 0, 7) : '',
+            'spiderID' => $spiderID,
         ];
 
-        if ($spiderID !== null) {
-            $sessionData['spiderID'] = $spiderID;
-        }
-
         $this->legacySession = SessionEditor::create($sessionData);
     }