From: Tim Düsterhus Date: Tue, 18 May 2021 08:48:00 +0000 (+0200) Subject: Gracefully handle missing legacy session in SessionHandler::__get() X-Git-Tag: 5.4.0_Alpha_3~21 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=82b7706e3ac6c53fbb14ea0bce5f237860b31619;p=GitHub%2FWoltLab%2FWCF.git Gracefully handle missing legacy session in SessionHandler::__get() --- 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':