Commit 493c09e4 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Remove urlDecode()

parent 0f420f55
Pipeline #1011 passed with stage
in 1 minute and 35 seconds
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment