1
0
mirror of https://github.com/phpmyadmin/phpmyadmin.git synced 2026-10-29 21:24:44 +03:00

Merge pull request #765 from slimtim/bug_4153

When importing a SQL file convert \r line-endings to \n
This commit is contained in:
Marc Delisle
2013-11-21 04:16:11 -08:00

View File

@@ -189,6 +189,11 @@ class ImportSql extends ImportPlugin
continue;
}
}
// Convert CR (but not CRLF) to LF otherwise all queries
// may not get executed on some platforms
$buffer = preg_replace("/\r($|[^\n])/", "\n$1", $buffer);
// Current length of our buffer
$len = strlen($buffer);