From 76167145fb63ae5bbdd60c6a4b4bc6514e6529dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Thu, 24 Jun 2004 11:29:03 +0000 Subject: [PATCH] YET another fix for comments handling :-) --- libraries/read_dump.lib.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libraries/read_dump.lib.php b/libraries/read_dump.lib.php index 013dc5f9c..56579fcae 100644 --- a/libraries/read_dump.lib.php +++ b/libraries/read_dump.lib.php @@ -72,11 +72,12 @@ function PMA_splitSqlFile(&$ret, $sql, $release) // lets skip comments (/*, -- and #) else if (($char == '-' && $sql[$i + 1] == '-' && $sql[$i + 2] <= ' ') || $char == '#' || ($char == '/' && $sql[$i + 1] == '*')) { - $i = strpos($sql, $char == '/' ? '*/' : "\n", $i) + ($char == '/' ? 1 : 0); + $i = strpos($sql, $char == '/' ? '*/' : "\n", $i); // didn't we hit end of string? if ($i === FALSE) { break; } + if ($char == '/') $i++; } // We are not in a string, first check for delimiter...