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)