From d3bf341521ed68fe6a14e03f9719a9b5ec1b9d02 Mon Sep 17 00:00:00 2001 From: Greg Bowler Date: Mon, 20 Nov 2023 21:21:18 +0000 Subject: [PATCH] tweak: check property is set before access --- src/Authenticator.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Authenticator.php b/src/Authenticator.php index 25f009d..9633494 100644 --- a/src/Authenticator.php +++ b/src/Authenticator.php @@ -87,7 +87,7 @@ public function logout(Token $token = null):void { $token = new Token($this->secret); } - if($this->user->email === self::FAKE_EMAIL) { + if(isset($this->user) && $this->user->email === self::FAKE_EMAIL) { $this->session->remove(SessionData::class); unset($this->user); }