MainNavBar: harden Registry access

This commit is contained in:
Aaron van Geffen 2024-12-22 15:45:44 +01:00
parent 1e26a51d08
commit 2d2ef38422

View File

@ -33,7 +33,7 @@ class MainNavBar extends NavBar
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button>'; </button>';
if (Registry::get('user')->isLoggedIn()) if (Registry::has('user') && Registry::get('user')->isLoggedIn())
{ {
echo ' echo '
<div class="collapse navbar-collapse justify-content-end" id="', $this->innerMenuId, '"> <div class="collapse navbar-collapse justify-content-end" id="', $this->innerMenuId, '">