Skip to content

Commit

Permalink
fix: filter empty value from ids to fix SQLSTATE[42000] Syntax error …
Browse files Browse the repository at this point in the history
…when query string is long(or in other case).
  • Loading branch information
gary101 committed Sep 16, 2020
1 parent 519abf5 commit 1652131
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engines/TNTSearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ protected function applyOrders(Query $query, array $ids)
sprintf('field(%s%s,%s)',
DB::getTablePrefix(),
$query->getModel()->getQualifiedKeyName(),
implode(',', $ids)
implode(',', array_filter($ids))
)
);
}
Expand Down

0 comments on commit 1652131

Please sign in to comment.