diff --git a/e107_handlers/e_parse_class.php b/e107_handlers/e_parse_class.php index 0800b4a58..5b4d3e8fb 100644 --- a/e107_handlers/e_parse_class.php +++ b/e107_handlers/e_parse_class.php @@ -491,9 +491,12 @@ class e_parse extends e_parser * @return string|array * @todo complete the documentation of this essential method */ - public function toDB($data, $nostrip =false, $no_encode = false, $mod = false, $parm = null) + public function toDB($data = null, $nostrip =false, $no_encode = false, $mod = false, $parm = null) { - $core_pref = e107::getConfig(); + if($data === null) + { + return null; + } if (is_array($data)) { @@ -508,9 +511,7 @@ class e_parse extends e_parser return $ret; } - - - + if (MAGIC_QUOTES_GPC == true && $nostrip == false) { $data = stripslashes($data); @@ -521,6 +522,8 @@ class e_parse extends e_parser return $data; } + $core_pref = e107::getConfig(); + if ($mod !== 'pReFs') //XXX We're not saving prefs. {