From ad57c397b6db84f5bd27cc3aba14e849297eb12d Mon Sep 17 00:00:00 2001 From: Roly Rudy Gutierrez Pinto Date: Tue, 26 Nov 2019 12:24:21 -0400 Subject: [PATCH] PMC-1401 warning issues in class.phpSqlParser.php --- gulliver/system/class.phpSqlParser.php | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/gulliver/system/class.phpSqlParser.php b/gulliver/system/class.phpSqlParser.php index eaa43187b..17fa0ac4f 100644 --- a/gulliver/system/class.phpSqlParser.php +++ b/gulliver/system/class.phpSqlParser.php @@ -876,6 +876,8 @@ EOREGEX; } break; } + + $shouldItContinue = false; switch ($upper) { case 'AS': $token_count ++; @@ -886,7 +888,7 @@ EOREGEX; ++ $n; } - continue; + $shouldItContinue = true; break; case 'INDEX': if ($token_category == 'CREATE') { @@ -908,12 +910,12 @@ EOREGEX; case 'OUTER': # $expression .= $token; $token_count ++; - continue; + $shouldItContinue = true; break; case 'FOR': $token_count ++; $skip_next = true; - continue; + $shouldItContinue = true; break; case 'LEFT': case 'RIGHT': @@ -969,7 +971,8 @@ EOREGEX; break; default: if ($token === false || empty( $token ) || $token === "") { - continue; + $shouldItContinue = true; + break; } if ($token_count == 0) { @@ -982,6 +985,9 @@ EOREGEX; $token_count ++; break; } + if ($shouldItContinue === true) { + continue; + } ++ $i; } if (substr( trim( $table ), 0, 1 ) == '(') {