includes/mysqli_functions.php: mysqli_real_escape_string() does not like null entries [deprecated since PHP 8.1], so an empty string should take their place - fix
includes/mysqli_functions.php: mysqli_real_escape_string() does not like null entries [deprecated since PHP 8.1], so an empty string should take their place - fix

--- a/includes/mysqli_functions.php
+++ b/includes/mysqli_functions.php
@@ -113,7 +113,7 @@
 // Used to escape text being put into the database.
 function escapestring($str) {
 	global $dbconnect;
-   if (!is_array($str)) return $dbconnect->real_escape_string($str);
+   if (!is_array($str)) return $dbconnect->real_escape_string(($str===null) ? '' : $str);
    return array_map('escapestring', $str);
 }