From 3087b012948b301473f149b2ba70daa810833410 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Tue, 18 Jun 2024 14:50:59 +0000
Subject: [PATCH] fixes #4324

Closes #4324

Merge request studip/studip!3124
---
 templates/layouts/base.php | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/templates/layouts/base.php b/templates/layouts/base.php
index d7fc1f10d2b..1f2ac32e711 100644
--- a/templates/layouts/base.php
+++ b/templates/layouts/base.php
@@ -55,7 +55,7 @@ $lang_attr = str_replace('_', '-', $_SESSION['_language']);
                 'OPENGRAPH_ENABLE'     => Config::get()->OPENGRAPH_ENABLE,
                 'COURSEWARE_CERTIFICATES_ENABLE' => Config::get()->COURSEWARE_CERTIFICATES_ENABLE,
                 'PERSONAL_NOTIFICATIONS_AUDIO_DEACTIVATED' =>
-                    (bool) User::findCurrent()->getConfiguration()->PERSONAL_NOTIFICATIONS_AUDIO_DEACTIVATED,
+                    (bool) User::findCurrent()?->getConfiguration()->PERSONAL_NOTIFICATIONS_AUDIO_DEACTIVATED,
             ]) ?>,
         }
     </script>
@@ -97,7 +97,7 @@ $lang_attr = str_replace('_', '-', $_SESSION['_language']);
         <system-notification-manager
             id="system-notifications"
             :notifications='<?= htmlReady(json_encode(PageLayout::getMessages())) ?>'
-            placement="<?= User::findCurrent()->getConfiguration()->SYSTEM_NOTIFICATIONS_PLACEMENT ?>"></system-notification-manager>
+            placement="<?= User::findCurrent()?->getConfiguration()->SYSTEM_NOTIFICATIONS_PLACEMENT ?? 'topcenter' ?>"></system-notification-manager>
     </main>
     <!-- End main content -->
 
-- 
GitLab