Open bessone opened 1 year ago
The error occurs when the two queries are joined, also reporting the parameters which are thus duplicated, but the placeholders are not duplicated
The pull request https://github.com/bessone/searchable/pull/2 seems to solve the problem, you should test it with various versions of Laravel and/or PHP and also conditions with multiple Global scopes on the model(s) in case of join
After upgrading a project to Laravel 9 and PHP 8.1 using search I get the error:
SQLSTATE[HY093]: Invalid parameter number
Debugging the application I understood that the error is caused by a global scope active on the model, where there is a where with two parameters.
It is somehow related to these issues of the original project:
Before upgrading to Laravel 9 and PHP 8.1 (Laravel 8 with PHP 7.4) the problem did not occur.