From 24d8dec4e0eedb1e34f85633d4cff0bb43f1cc63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 21 Jan 2025 16:13:12 +0100 Subject: [PATCH] Update functions.lib.php --- htdocs/core/lib/functions.lib.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 3b4f8e0dd61..f177ad01945 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1066,6 +1066,7 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null if (preg_match('/^array/', $check)) { // If 'array' or 'array:restricthtml' or 'array:aZ09' or 'array:intcomma' if (!is_array($out) || empty($out)) { $out = explode(',', $out); + $tmpcheck = 'alphanohtml'; } else { $tmparray = explode(':', $check); if (!empty($tmparray[1])) { @@ -1073,9 +1074,9 @@ function GETPOST($paramname, $check = 'alphanohtml', $method = 0, $filter = null } else { $tmpcheck = 'alphanohtml'; } - foreach ($out as $outkey => $outval) { - $out[$outkey] = sanitizeVal($outval, $tmpcheck, $filter, $options); - } + } + foreach ($out as $outkey => $outval) { + $out[$outkey] = sanitizeVal($outval, $tmpcheck, $filter, $options); } } else { // If field name is 'search_xxx' then we force the add of space after each < and > (when following char is numeric) because it means