diff --git a/ChangeLog b/ChangeLog index f8c2cecd6..9f404fb71 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ phpMyAdmin - Changelog $Id$ $Source$ +2001-07-03 Marc Delisle + * lib.inc.php3: patch from Chee Wai for illegal index + 2001-07-03 Steve Alberty * tbl_properties.php3: fix minor bug under PHP3 with space usage display diff --git a/lib.inc.php3 b/lib.inc.php3 index 5a439ac6f..bd1ef9776 100755 --- a/lib.inc.php3 +++ b/lib.inc.php3 @@ -819,7 +819,12 @@ function split_sql_file($sql, $delimiter) { function remove_remarks($sql) { $i = 0; while ($i < strlen($sql)) { - if ($sql[$i] == "#" and ($sql[$i-1] == "\n" or $i==0)) { +// patch from Chee Wai +// (otherwise, if $i==0 and $sql[$i] == "#", the original order +// in the second part of the AND bit will fail with illegal index) +// if ($sql[$i] == "#" and ($sql[$i-1] == "\n" or $i==0)) { + + if ($sql[$i] == "#" and ($i==0 or $sql[$i-1] == "\n")) { $j=1; while ($sql[$i+$j] != "\n") { $j++;