Fixing \r\n bug in SQL parser (see comment on rev. 7a7173c0f62f in stable)
authorDan
Wed, 10 Sep 2008 10:49:13 -0400
changeset 709 a5917b034435
parent 704 077887be639d
child 712 331e009416d5
Fixing \r\n bug in SQL parser (see comment on rev. 7a7173c0f62f in stable)
includes/sql_parse.php
--- a/includes/sql_parse.php	Sat Aug 23 16:03:32 2008 -0400
+++ b/includes/sql_parse.php	Wed Sep 10 10:49:13 2008 -0400
@@ -73,9 +73,14 @@
       {
         throw new Exception('SQL file doesn\'t exist');
       }
+      
     }
     $this->sql_array = false;
     $this->tpl_strings = array();
+    
+    // convert \r\n in the schema to \n, in case some FTP client or zip utility ran unix2dos for us
+    // thanks to InvisGhost for reporting this error
+    $this->sql_string = str_replace("\r\n", "\n", $this->sql_string);
   }
   
   /**