From c58e63e92757b70f255dcc1347d4442059328df6 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Mon, 6 Jun 2022 13:53:33 -0400 Subject: [PATCH] Don't turn '0' into '' --- web/includes/functions.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web/includes/functions.php b/web/includes/functions.php index f521afab2..ea2fc82c1 100644 --- a/web/includes/functions.php +++ b/web/includes/functions.php @@ -2011,19 +2011,19 @@ function validNum( $input ) { // For general strings function validStr($input) { - if(!$input) return ''; + if (is_null($input)) return ''; return strip_tags($input); } // For strings in javascript or tags etc, expected to be in quotes so further quotes escaped rather than converted function validJsStr($input) { - if(!$input) return ''; + if (is_null($input)) return ''; return strip_tags(addslashes($input)); } // For general text in pages outside of tags or quotes so quotes converted to entities function validHtmlStr($input) { - if(!$input) return ''; + if (is_null($input)) return ''; return htmlspecialchars($input, ENT_QUOTES); }