Browse code

includes/mysqli_functions.php: change empty string to quoted NULL strings - as some entries in the database are already empty strings as well and can be easily confused otherwise

Clarissa Walker authored on 2026/11/08 11:54:08
Showing 1 changed files
... ...
@@ -103,7 +103,7 @@ function dbclose() {
103 103
 // Used to escape text being put into the database.
104 104
 function escapestring($str) {
105 105
 	global $dbconnect;
106
-   if (!is_array($str)) return $dbconnect->real_escape_string(($str===null) ? '' : $str);
106
+   if (!is_array($str)) return $dbconnect->real_escape_string(($str===null) ? "NULL" : $str);
107 107
    return array_map('escapestring', $str);
108 108
 }
109 109