From 8fda3c2fa00c4d75366e0ff14c4e36381e31b6f8 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 17 Sep 2009 17:05:14 +0000 Subject: [PATCH] parser should return an array in case of errors, thanks to Thomas Pulickal --- libraries/sqlparser.lib.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/sqlparser.lib.php b/libraries/sqlparser.lib.php index eed5e3c1a4..b9d9da8767 100644 --- a/libraries/sqlparser.lib.php +++ b/libraries/sqlparser.lib.php @@ -345,7 +345,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { $debugstr = $GLOBALS['strSQPBugUnclosedQuote'] . ' @ ' . $startquotepos. "\n" . 'STR: ' . htmlspecialchars($quotetype); PMA_SQP_throwError($debugstr, $sql); - return $sql; + return $sql_array; } // If the quote is the first character, it can't be @@ -496,7 +496,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { $debugstr = $GLOBALS['strSQPBugInvalidIdentifer'] . ' @ ' . ($count1+1) . "\n" . 'STR: ' . htmlspecialchars(PMA_substr($sql, $count1, $count2 - $count1)); PMA_SQP_throwError($debugstr, $sql); - return $sql; + return $sql_array; } } if ($is_digit && (!$is_hex_digit) && (($c2 == 'e') || ($c2 == 'E'))) { @@ -613,7 +613,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { $debugstr = $GLOBALS['strSQPBugUnknownPunctuation'] . ' @ ' . ($count1+1) . "\n" . 'STR: ' . htmlspecialchars($punct_data); PMA_SQP_throwError($debugstr, $sql); - return $sql; + return $sql_array; } PMA_SQP_arrayAdd($sql_array, 'punct', $punct_data, $arraysize); continue; @@ -627,7 +627,7 @@ if (! defined('PMA_MINIMUM_COMMON')) { $debugstr = 'C1 C2 LEN: ' . $count1 . ' ' . $count2 . ' ' . $len . "\n" . 'STR: ' . $GLOBALS['PMA_substr']($sql, $count1, $count2 - $count1) . "\n"; PMA_SQP_bug($debugstr, $sql); - return $sql; + return $sql_array; } // end while ($count2 < $len) -- 2.11.4.GIT