Fix handling of whitespace at the end of imported file.

This commit is contained in:
Michal Čihař
2005-10-06 08:41:22 +00:00
parent 05b0e658a5
commit f58e0ae0ff
2 changed files with 8 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ $Source$
2005-10-06 Michal Čihař <michal@cihar.com> 2005-10-06 Michal Čihař <michal@cihar.com>
* import.php: Correctly report that file could not be read. * 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 <lem9@users.sourceforge.net> 2005-10-05 Marc Delisle <lem9@users.sourceforge.net>
* db_details_structure.php, tbl_properties_table_info.php: detect * db_details_structure.php, tbl_properties_table_info.php: detect

View File

@@ -54,6 +54,12 @@ if (isset($import_list)) {
if ($i == 2147483647) { if ($i == 2147483647) {
$i = $oi; $i = $oi;
if (!$finished) break; if (!$finished) break;
// at the end there might be some whitespace...
if (trim($buffer) == '') {
$buffer = '';
$len = 0;
break;
}
} }
// Grab current character // Grab current character