--- a/includes/dbal.php Sat Mar 01 18:56:37 2008 -0500
+++ b/includes/dbal.php Sat Mar 01 18:57:07 2008 -0500
@@ -103,8 +103,8 @@
function die_json()
{
$e = addslashes(htmlspecialchars(mysql_error()));
- $q = addslashes($this->latest_query);
- $t = "{'mode':'error','error':'An error occurred during database query.\nQuery was:\n $q\n\nError returned by MySQL: $e'}";
+ $q = str_replace("\n", "\\n", addslashes($this->latest_query));
+ $t = "{'mode':'error','error':'An error occurred during database query.\\nQuery was:\\n $q\\n\\nError returned by MySQL: $e'}";
die($t);
}