HttpInput : do not use isset but in_array, to avoid problem if the value is null
This commit is contained in:
parent
a7b2514376
commit
aaed63908e
1 changed files with 2 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue