summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Čihař <michal@cihar.com>2017-01-03 13:03:31 +0100
committerMichal Čihař <michal@cihar.com>2017-01-03 13:03:31 +0100
commit7eebd40cef49caaaf5163febe5e2082f00cf76d0 (patch)
treee70e365c02949717994afe3b39cea0a023a92c87 /src
parent14777f12fa5c089888dea54b8ad2c782e00567d9 (diff)
downloadsql-parser-7eebd40cef49caaaf5163febe5e2082f00cf76d0.zip
sql-parser-7eebd40cef49caaaf5163febe5e2082f00cf76d0.tar.gz
sql-parser-7eebd40cef49caaaf5163febe5e2082f00cf76d0.tar.bz2
Fix checking return value from stripos
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'src')
-rw-r--r--src/Statement.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Statement.php b/src/Statement.php
index e3e5968..b7c4da0 100644
--- a/src/Statement.php
+++ b/src/Statement.php
@@ -479,11 +479,11 @@ abstract class Statement
// Handle ordering of Multiple Joins in a query
if ($clauseStartIdx != -1) {
- if ($joinStart == 0 && stripos($clauseType, 'JOIN')) {
+ if ($joinStart == 0 && stripos($clauseType, 'JOIN') !== false) {
$joinStart = 1;
- } elseif ($joinStart == 1 && ! stripos($clauseType, 'JOIN')) {
+ } elseif ($joinStart == 1 && stripos($clauseType, 'JOIN') === false) {
$joinStart = 2;
- } elseif ($joinStart == 2 && stripos($clauseType, 'JOIN')) {
+ } elseif ($joinStart == 2 && stripos($clauseType, 'JOIN') !== false) {
$error = 1;
}
}