mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-28 14:52:24 +09:00
Remove outdated checks for old PHP versions
This commit is contained in:
parent
1bf110439a
commit
a0d9e1c6ad
3 changed files with 7 additions and 21 deletions
|
|
@ -1360,10 +1360,9 @@ class Context
|
|||
* @see Cast variables, such as _srl, page, and cpage, into interger
|
||||
* @param string $key Variable key
|
||||
* @param string $val Variable value
|
||||
* @param string $do_stripslashes Whether to strip slashes
|
||||
* @return mixed filtered value. Type are string or array
|
||||
*/
|
||||
public function _filterRequestVar($key, $val, $do_stripslashes = 1)
|
||||
public function _filterRequestVar($key, $val)
|
||||
{
|
||||
if(!($isArray = is_array($val)))
|
||||
{
|
||||
|
|
@ -1389,19 +1388,6 @@ class Context
|
|||
else
|
||||
{
|
||||
$result[$k] = $v;
|
||||
|
||||
if($do_stripslashes && version_compare(PHP_VERSION, '5.4.0', '<') && get_magic_quotes_gpc())
|
||||
{
|
||||
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]))
|
||||
{
|
||||
array_walk_recursive($result[$k], function(&$val) { $val = trim($val); });
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue