From 1fa6771ba132d6c15e87d53eceb5b56aa3dbbcac Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Wed, 2 Jul 2014 16:22:37 +0000 Subject: [PATCH] Remove the automatic null for empty string in the check_sql function --- resources/functions.php | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/resources/functions.php b/resources/functions.php index b2b6c19078..b37ceea854 100644 --- a/resources/functions.php +++ b/resources/functions.php @@ -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 } }