HttpInput : do not use in_array but array_key_exists,
This commit is contained in:
parent
aaed63908e
commit
17b8a0504b
1 changed files with 2 additions and 2 deletions
|
|
@ -86,7 +86,7 @@ class HttpInput
|
|||
{
|
||||
if (func_num_args()==3)
|
||||
{
|
||||
if (in_array($p_name,$this->array) )
|
||||
if (array_key_exists($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 (!in_array($p_name,$this->array))
|
||||
if (!array_key_exists($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