mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
Fix multidimensional array handling in Context::_filterRequestVar()
This commit is contained in:
parent
397a1e163b
commit
9703b1268d
1 changed files with 13 additions and 2 deletions
|
|
@ -1377,10 +1377,21 @@ class Context
|
|||
|
||||
if($do_stripslashes && version_compare(PHP_VERSION, '5.4.0', '<') && get_magic_quotes_gpc())
|
||||
{
|
||||
$result[$k] = stripslashes($result[$k]);
|
||||
if (is_array($result[$k]))
|
||||
{
|
||||
array_walk_recursive($result[$k], function(&$val) { $val = stripslashes($val); });
|
||||
}
|
||||
else
|
||||
{
|
||||
$result[$k] = stripslashes($result[$k]);
|
||||
}
|
||||
}
|
||||
|
||||
if(!is_array($result[$k]))
|
||||
if(is_array($result[$k]))
|
||||
{
|
||||
array_walk_recursive($result[$k], function(&$val) { $val = trim($val); });
|
||||
}
|
||||
else
|
||||
{
|
||||
$result[$k] = trim($result[$k]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue