nullable_htmlentities - prevent Passing null to parameter error

This commit is contained in:
wrongecho 2025-01-14 15:37:24 +00:00
parent 701df8db38
commit 54dde984ac
2 changed files with 2 additions and 2 deletions

View File

@ -51,7 +51,7 @@ function key32gen()
function nullable_htmlentities($unsanitizedInput)
{
//return htmlentities($unsanitizedInput ?? '');
return htmlspecialchars($unsanitizedInput, ENT_QUOTES, 'UTF-8');
return htmlspecialchars($unsanitizedInput ?? '', ENT_QUOTES, 'UTF-8');
}
function initials($str)

View File

@ -333,7 +333,7 @@ if (isset($_POST['login'])) {
<div class="card">
<div class="card-body login-card-body">
<?php if(!empty($config_login_message)){ ?>
<?php if (!empty($config_login_message)){ ?>
<p class="login-box-msg px-0"><?php echo nl2br($config_login_message); ?></p>
<?php } ?>