From 82b7706e3ac6c53fbb14ea0bce5f237860b31619 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Tue, 18 May 2021 10:48:00 +0200 Subject: [PATCH] Gracefully handle missing legacy session in SessionHandler::__get() --- .../install/files/lib/system/session/SessionHandler.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php index e2c4521e23..4bbb3a90d8 100644 --- a/wcfsetup/install/files/lib/system/session/SessionHandler.class.php +++ b/wcfsetup/install/files/lib/system/session/SessionHandler.class.php @@ -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': -- 2.20.1