diff --git a/include/lib/http_input.class.php b/include/lib/http_input.class.php index f286d8d6e..d486cd6e3 100644 --- a/include/lib/http_input.class.php +++ b/include/lib/http_input.class.php @@ -48,14 +48,14 @@ class HttpInput if ($p_type=="string") return; // Check if number - if ($p_type=="number"&&isNumber($this->array[$p_name])==0 ) + else if ($p_type=="number"&&isNumber($this->array[$p_name])==0 ) { $this->array[$p_name]=h($this->array[$p_name]); throw new Exception(_("Type invalide")."[ $p_name ] = {$this->array[$p_name]}" , EXC_PARAM_TYPE); } // Check if date dd.mm.yyyy - if ($p_type=="date") + else if ($p_type=="date") { if (isDate($this->array[$p_name]) <> $this->array[$p_name]) { @@ -64,11 +64,13 @@ class HttpInput , EXC_PARAM_TYPE); } } - if ($p_type=="array"&&!is_array($this->array[$p_name])) + else if ($p_type=="array"&&!is_array($this->array[$p_name])) { $this->array[$p_name]=h($this->array[$p_name]); throw new Exception(_("Type invalide")."[ $p_name ] = {$this->array[$p_name]}" , EXC_PARAM_TYPE); + }else { + throw new Exception(_("Unknown type")); } } catch (Exception $ex)