From 867b757a7072682c85aebcead56aff42bb7a3fdd Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Wed, 4 Dec 2019 20:04:14 +0100 Subject: [PATCH] zero is considered as empty value --- include/lib/http_input.class.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/lib/http_input.class.php b/include/lib/http_input.class.php index fab33d237..ac3b1d9e2 100644 --- a/include/lib/http_input.class.php +++ b/include/lib/http_input.class.php @@ -82,7 +82,7 @@ class HttpInput // Check if number else if ($p_type=="number") { - if (empty($this->array[$p_name])) + if (trim($this->array[$p_name]) == "") { $this->array[$p_name]=$this->empty; } @@ -97,7 +97,7 @@ class HttpInput // Check if date dd.mm.yyyy else if ($p_type=="date") { - if (empty($this->array[$p_name])) + if (trim($this->array[$p_name]) == "" ) { $this->array[$p_name]=$this->empty; } @@ -110,7 +110,7 @@ class HttpInput } else if ($p_type=="array") { - if (empty($this->array[$p_name])) + if (trim($this->array[$p_name]) == "" ) { $this->array[$p_name]=$this->empty; }