Gracefully handle missing legacy session in SessionHandler::__get()
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 18 May 2021 08:48:00 +0000 (10:48 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 18 May 2021 08:48:00 +0000 (10:48 +0200)
wcfsetup/install/files/lib/system/session/SessionHandler.class.php

index e2c4521e231b561201f7aa5f979f0f24cddaa3f8..4bbb3a90d82383c67301612e8955b33e1d16b5fc 100644 (file)
@@ -169,7 +169,7 @@ final class SessionHandler extends SingletonFactory
             case 'pageObjectID':
             case 'parentPageID':
             case 'parentPageObjectID':
-                return $this->legacySession->{$key};
+                return $this->legacySession->{$key} ?? null;
 
             /** @deprecated 5.4 - The below values are deprecated. */
             case 'ipAddress':