Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
493c09e4
Commit
493c09e4
authored
Oct 13, 2018
by
Carsten Rose
Browse files
Remove urlDecode()
parent
0f420f55
Pipeline
#1011
passed with stage
in 1 minute and 35 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/helper/Sanitize.php
View file @
493c09e4
...
...
@@ -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.
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment