From bdd5a01e2a68f5d7ade47db71401a068743ba2e6 Mon Sep 17 00:00:00 2001 From: chansizzle <14916599+chansizzle@users.noreply.github.com> Date: Thu, 30 Jan 2020 19:20:15 -0700 Subject: [PATCH] Update functions.php (#5137) --- resources/functions.php | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/resources/functions.php b/resources/functions.php index cd47c4c8d8..42849e3508 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -17,7 +17,7 @@ The Initial Developer of the Original Code is Mark J Crane - Portions created by the Initial Developer are Copyright (C) 2008-2019 + Portions created by the Initial Developer are Copyright (C) 2008-2020 the Initial Developer. All Rights Reserved. Contributor(s): @@ -1921,7 +1921,15 @@ function number_pad($number,$n) { //escape user data function escape($string) { - return htmlentities($string, ENT_QUOTES | ENT_HTML5, 'UTF-8'); + if (is_array($string)) { + return false; + } + elseif (isset($string) && strlen($string)) { + return htmlentities($string, ENT_QUOTES | ENT_HTML5, 'UTF-8'); + } + else { + return false; + } //return htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); }