Skip to content
Snippets Groups Projects
Commit 493c09e4 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Remove urlDecode()

parent 0f420f55
No related branches found
No related tags found
1 merge request!104B3529 - No double urldecode() of GET parameters - refs #3529, closes #3529
Pipeline #1011 passed
......@@ -252,33 +252,7 @@ class Sanitize {
return $item;
}
/**
* urlencode() any input and decode again. This normalizes all characters and guarantees that there are no more
* urlencoded characters.
*
* @param array|string $item
*
* @return array|string
* @throws CodeException
*/
public static function urlDecodeArr($item) {
if (is_array($item)) {
foreach ($item as $key => $value) {
$value = self::urlDecodeArr($value);
$item[$key] = $value;
}
} else {
if (is_string($item)) {
$item = urldecode($item);
} elseif (!is_numeric($item)) {
throw new qfq\CodeException ("Expect type 'string / numeric / array' - but there is something else.", ERROR_UNEXPECTED_TYPE);
}
}
return $item;
}
/**
* Check a given $_GET[$key] is digit.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment