diff options
Diffstat (limited to 'include/functions.inc.php')
-rw-r--r-- | include/functions.inc.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/functions.inc.php b/include/functions.inc.php index edc56979b..42b187bbd 100644 --- a/include/functions.inc.php +++ b/include/functions.inc.php @@ -1565,9 +1565,9 @@ function check_input_parameter($param_name, $param_array, $is_array, $pattern) fatal_error('[Hacking attempt] the input parameter "'.$param_name.'" should be an array'); } - foreach ($param_value as $item_to_check) + foreach ($param_value as $key => $item_to_check) { - if (!preg_match($pattern, $item_to_check)) + if (!preg_match(PATTERN_ID, $key) or !preg_match($pattern, $item_to_check)) { fatal_error('[Hacking attempt] an item is not valid in input parameter "'.$param_name.'"'); } |