Skip to content

Commit

Permalink
Merge pull request #17 from gary101/hotfix-sql-error
Browse files Browse the repository at this point in the history
fix: filter empty value from ids to fix SQLSTATE[42000] Syntax error …
  • Loading branch information
vanry authored Sep 22, 2020
2 parents 519abf5 + 1652131 commit 871cf26
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 871cf26

Please sign in to comment.