You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using certain values for query string, "Parameter q is required" is thrown. More exactly, any value that returns true from empty(...) does not work.
Steps to reproduce
For example, App\Models\Taxon::search("0")->get() throws an error.
Description
When using certain values for query string, "Parameter
q
is required" is thrown. More exactly, any value that returns true from empty(...) does not work.Steps to reproduce
For example,
App\Models\Taxon::search("0")->get()
throws an error.Expected Behavior
Found values should be returned.
Actual Behavior
"Parameter
q
is required" is thrown.Metadata
Typesense Version:
0.25.1
OS:
Culprit
https://github.com/typesense/laravel-scout-typesense-driver/blob/master/src/Engines/TypesenseEngine.php#L208 and https://github.com/typesense/laravel-scout-typesense-driver/blob/master/src/Engines/TypesenseEngine.php#L208 runs
array_filter
on parameters array, therefore, removing the "0" query param, and typesense request is then missing theq
parameter.Possible solution
Change array_filter to a stricter function, such as rejecting only
null
values.The text was updated successfully, but these errors were encountered: