Browse Source

Remove the automatic null for empty string in the check_sql function

Mark Crane 11 years ago
parent
commit
68579291a2
1 changed files with 1 additions and 10 deletions
  1. 1 10
      resources/functions.php

+ 1 - 10
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
 		}
 	}