Skip to content

Commit

Permalink
[BUGFIX] Prevent an exception if no FE user is logged in
Browse files Browse the repository at this point in the history
Related: #68
  • Loading branch information
einpraegsam committed Feb 7, 2025
1 parent 3c9b3e1 commit 9c65db5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Utility/FrontendUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static function isLoggedInFrontendUser(): bool
{
$authentication = self::getFrontendUserAuthentication();
if ($authentication !== null) {
return $authentication->user['uid'] > 0;
return ($authentication->user['uid'] ?? 0) > 0;
}
return false;
}
Expand Down

0 comments on commit 9c65db5

Please sign in to comment.