Add a check and use doubleval if PHP is too old.
Logged In: YES user_id=575134
Mine also complained about mysql_real_escape_string being missing.
I just added this to a separate file & included it in the luaparser.php:
function floatval($strValue) { $floatValue = ereg_replace("(^[0-9]*)(\\.|,)([0-9]*)(.*)", "\\1.\\3", $strValue); if (!is_numeric($floatValue)) $floatValue = ereg_replace("(^[0-9]*)(.*)", "\\1", $strValue); if (!is_numeric($floatValue)) $floatValue = 0; return $floatValue; }
function mysql_real_escape_string ($string) { return mysql_escape_string($string); }
Log in to post a comment.
Logged In: YES
user_id=575134
Mine also complained about mysql_real_escape_string being
missing.
I just added this to a separate file & included it in the
luaparser.php:
function floatval($strValue) {
$floatValue =
ereg_replace("(^[0-9]*)(\\.|,)([0-9]*)(.*)", "\\1.\\3",
$strValue);
if (!is_numeric($floatValue)) $floatValue =
ereg_replace("(^[0-9]*)(.*)", "\\1", $strValue);
if (!is_numeric($floatValue)) $floatValue = 0;
return $floatValue;
}
function mysql_real_escape_string ($string) {
return mysql_escape_string($string);
}