diff --git a/ChangeLog b/ChangeLog index 05b63db90..61dafff56 100755 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,8 @@ $Source$ 2005-10-06 Michal Čihař * import.php: Correctly report that file could not be read. + * libraries/import/sql.php: Fix handling of whitespace at the end of + imported file. 2005-10-05 Marc Delisle * db_details_structure.php, tbl_properties_table_info.php: detect diff --git a/libraries/import/sql.php b/libraries/import/sql.php index f359874d2..8ad83672f 100644 --- a/libraries/import/sql.php +++ b/libraries/import/sql.php @@ -54,6 +54,12 @@ if (isset($import_list)) { if ($i == 2147483647) { $i = $oi; if (!$finished) break; + // at the end there might be some whitespace... + if (trim($buffer) == '') { + $buffer = ''; + $len = 0; + break; + } } // Grab current character