Skip to content

Commit

Permalink
tweak: check property is set before access
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Nov 20, 2023
1 parent 7478bda commit d3bf341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Authenticator.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit d3bf341

Please sign in to comment.