From 94960f72347aa217107e5a43cfe8cdd3584a48c0 Mon Sep 17 00:00:00 2001
From: Jan-Hendrik Willms <tleilax+studip@gmail.com>
Date: Fri, 16 Feb 2024 13:38:15 +0000
Subject: [PATCH] fixes #3708

Closes #3708

Merge request studip/studip!2611
---
 templates/_standard_loginform.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/templates/_standard_loginform.php b/templates/_standard_loginform.php
index 7174287f060..51fc53b2352 100644
--- a/templates/_standard_loginform.php
+++ b/templates/_standard_loginform.php
@@ -23,10 +23,10 @@ $password_tooltip_text = (string)Config::get()->PASSWORD_TOOLTIP_TEXT;
             <? if ($username_tooltip_text) : ?>
                 <?= tooltipIcon($username_tooltip_text) ?>
             <? endif ?>
-            <input type="text" <?= (mb_strlen($uname) || $hidden) ? '' : 'autofocus' ?>
+            <input type="text" <?= (mb_strlen($uname ?? '') || $hidden) ? '' : 'autofocus' ?>
                    id="loginname"
                    name="loginname"
-                   value="<?= htmlReady($uname) ?>"
+                   value="<?= htmlReady($uname ?? '') ?>"
                    size="20"
                    spellcheck="false"
                    autocapitalize="off"
@@ -38,7 +38,7 @@ $password_tooltip_text = (string)Config::get()->PASSWORD_TOOLTIP_TEXT;
             <? if ($password_tooltip_text) : ?>
                 <?= tooltipIcon($password_tooltip_text) ?>
             <? endif ?>
-            <input type="password" <?= mb_strlen($uname) && !$hidden ? 'autofocus' : '' ?>
+            <input type="password" <?= mb_strlen($uname ?? '') && !$hidden ? 'autofocus' : '' ?>
                    id="password"
                    name="password"
                    autocomplete="current-password"
-- 
GitLab