Remove the automatic null for empty string in the check_sql function

This commit is contained in:
Mark Crane 2014-07-02 16:22:37 +00:00
parent bb68b9950a
commit c9e47462d8
1 changed files with 1 additions and 10 deletions

View File

@ -62,16 +62,7 @@
if (!function_exists('check_sql')) {
function check_sql($string) {
// if insert statement
if (strpos(strtolower(trim($string)), "insert") == 0) {
$string = str_replace(" ''", " null", $string);
$string = str_replace(",''", ",null", $string);
$string = str_replace("'',", "null,", $string);
$string = str_replace("(''", "(null", $string);
$string = str_replace("'')", "null)", $string);
$string = str_replace("'' )", "null )", $string);
}
return trim($string); //remove white space ADD TRIM BACK IN!
return trim($string); //remove white space
}
}