From 3d2da94e5eeb34caca64b0ef94c83b9a6ee1164d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Tim=20D=C3=BCsterhus?= Date: Mon, 8 Aug 2022 11:11:52 +0200 Subject: [PATCH] Use typed properties in Session class --- .../install/files/lib/system/session/Session.class.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/wcfsetup/install/files/lib/system/session/Session.class.php b/wcfsetup/install/files/lib/system/session/Session.class.php index a54b51b5c5..89196275e0 100644 --- a/wcfsetup/install/files/lib/system/session/Session.class.php +++ b/wcfsetup/install/files/lib/system/session/Session.class.php @@ -21,10 +21,7 @@ final class Session */ private $data; - /** - * @var UserAgent - */ - private $userAgent; + private UserAgent $userAgent; /** * Session constructor. @@ -90,7 +87,7 @@ final class Session */ public function getUserAgent(): UserAgent { - if ($this->userAgent === null) { + if (!isset($this->userAgent)) { $this->userAgent = new UserAgent($this->data['userAgent']); } -- 2.20.1