Skip to content

Commit 7eebd40

Browse files
committed
Fix checking return value from stripos
Signed-off-by: Michal Čihař <[email protected]>
1 parent 14777f1 commit 7eebd40

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Statement.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,11 +479,11 @@ public function validateClauseOrder($parser, $list)
479479

480480
// Handle ordering of Multiple Joins in a query
481481
if ($clauseStartIdx != -1) {
482-
if ($joinStart == 0 && stripos($clauseType, 'JOIN')) {
482+
if ($joinStart == 0 && stripos($clauseType, 'JOIN') !== false) {
483483
$joinStart = 1;
484-
} elseif ($joinStart == 1 && ! stripos($clauseType, 'JOIN')) {
484+
} elseif ($joinStart == 1 && stripos($clauseType, 'JOIN') === false) {
485485
$joinStart = 2;
486-
} elseif ($joinStart == 2 && stripos($clauseType, 'JOIN')) {
486+
} elseif ($joinStart == 2 && stripos($clauseType, 'JOIN') !== false) {
487487
$error = 1;
488488
}
489489
}

0 commit comments

Comments
 (0)