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:53:51
Showing 1 changed files
... ...
@@ -113,7 +113,7 @@ function dbclose() {
113 113
 // Used to escape text being put into the database.
114 114
 function escapestring($str) {
115 115
 	global $dbconnect;
116
-   if (!is_array($str)) return $dbconnect->real_escape_string(($str===null) ? '' : $str);
116
+   if (!is_array($str)) return $dbconnect->real_escape_string(($str===null) ? "NULL" : $str);
117 117
    return array_map('escapestring', $str);
118 118
 }
119 119