From aaed63908e8f023760ba406a96bc0ba887cef5ca Mon Sep 17 00:00:00 2001 From: Dany De Bontridder Date: Thu, 5 Oct 2017 23:26:23 +0200 Subject: [PATCH] HttpInput : do not use isset but in_array, to avoid problem if the value is null --- include/lib/http_input.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/lib/http_input.class.php b/include/lib/http_input.class.php index 99770782d..4b4146f01 100644 --- a/include/lib/http_input.class.php +++ b/include/lib/http_input.class.php @@ -86,7 +86,7 @@ class HttpInput { if (func_num_args()==3) { - if (isset($this->array[$p_name])) + if (in_array($p_name,$this->array) ) { $this->check_type($p_name, $p_type); return $this->array[$p_name]; @@ -96,7 +96,7 @@ class HttpInput return $p_default; } } - if (!isset($this->array[$p_name])) + if (!in_array($p_name,$this->array)) { throw new Exception(_('Paramètre invalide')."[$p_name]", EXC_PARAM_VALUE);