From 54dde984ac3dd26c757aaa7c530e2070708a1437 Mon Sep 17 00:00:00 2001 From: wrongecho Date: Tue, 14 Jan 2025 15:37:24 +0000 Subject: [PATCH] nullable_htmlentities - prevent Passing null to parameter error --- functions.php | 2 +- login.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/functions.php b/functions.php index ff88542f..881d2359 100644 --- a/functions.php +++ b/functions.php @@ -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) diff --git a/login.php b/login.php index 7b8024c1..bdeb8190 100644 --- a/login.php +++ b/login.php @@ -333,7 +333,7 @@ if (isset($_POST['login'])) {