includes/dbal.php
changeset 468 194a19711346
parent 424 f58e0b6e9c22
child 475 51386f1852b8
--- 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);
   }