http_input : strip_tags on array thrown an error

This commit is contained in:
Dany De Bontridder 2018-06-11 08:57:00 +02:00
parent 268495d442
commit 02f851e3b6

View file

@ -108,7 +108,8 @@ class HttpInput
if (array_key_exists($p_name,$this->array) )
{
$this->check_type($p_name, $p_type);
return strip_tags($this->array[$p_name]);
if ( is_string($this->array[$p_name]) ) return strip_tags($this->array[$p_name]);
return $this->array[$p_name];
}
else
{
@ -121,7 +122,8 @@ class HttpInput
EXC_PARAM_VALUE);
}
$this->check_type($p_name, $p_type);
return strip_tags($this->array[$p_name]);
if ( is_string($this->array[$p_name]) ) return strip_tags($this->array[$p_name]);
return $this->array[$p_name];
}
catch (Exception $e)
{