mirror of
https://github.com/e107inc/e107.git
synced 2025-06-04 18:06:58 +02:00
Fix array handling in toDB() and improved performance for simple integers.
This commit is contained in:
parent
943ea1ddd7
commit
7aaf09a6d2
@ -502,7 +502,8 @@ class e_parse extends e_parser
|
||||
foreach ($data as $key => $var)
|
||||
{
|
||||
//Fix - sanitize keys as well
|
||||
$ret[$this->toDB($key, $nostrip, $no_encode, $mod, $parm)] = $this->toDB($var, $nostrip, $no_encode, $mod, $parm);
|
||||
$key = filter_var($key,FILTER_SANITIZE_STRING);
|
||||
$ret[$key] = $this->toDB($var, $nostrip, $no_encode, $mod, $parm);
|
||||
}
|
||||
|
||||
return $ret;
|
||||
@ -515,6 +516,11 @@ class e_parse extends e_parser
|
||||
$data = stripslashes($data);
|
||||
}
|
||||
|
||||
if(intval($data) === $data) // simple integer.
|
||||
{
|
||||
return $data;
|
||||
}
|
||||
|
||||
if ($mod !== 'pReFs') //XXX We're not saving prefs.
|
||||
{
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user