Fix possible undefined index (bug #1008232).

This commit is contained in:
Michal Čihař
2004-08-13 08:51:56 +00:00
parent c4df15c991
commit a1a60039d8
2 changed files with 5 additions and 1 deletions

View File

@@ -5,6 +5,10 @@ phpMyAdmin - Changelog
$Id$
$Source$
2004-08-13 Michal Čihař <michal@cihar.com>
* libraries/read_dump.lib.php: Fix possible undefined index (bug
#1008232).
2004-08-12 Michal Čihař <michal@cihar.com>
* db_details_structure.php: Inconsistency of drop/empty links (bug
#989705).

View File

@@ -72,7 +72,7 @@ function PMA_splitSqlFile(&$ret, $sql, $release)
} // end if (in string)
// lets skip comments (/*, -- and #)
else if (($char == '-' && $sql[$i + 1] == '-' && $sql[$i + 2] <= ' ') || $char == '#' || ($char == '/' && $sql[$i + 1] == '*')) {
else if (($char == '-' && $sql_len > $i + 2 && $sql[$i + 1] == '-' && $sql[$i + 2] <= ' ') || $char == '#' || ($char == '/' && $sql_len > $i + 1 && $sql[$i + 1] == '*')) {
$i = strpos($sql, $char == '/' ? '*/' : "\n", $i);
// didn't we hit end of string?
if ($i === FALSE) {