Short description of the issue
Running a pages->(selector) against a Select Options Fieldtype (FieldtypeOptions) field using checkboxes throws an error if the selector returns no matches.
Expected behavior
If no matches are found, return an empty pages object with count property set to zero (as per other field types).
Actual behavior
An error is thrown if selector doesn't find a match:
Error: Exception: SQLSTATE[HY093]: Invalid parameter number: mixed named and positional parameters (in wire/core/PageFinder.php line 627)".
Steps to reproduce the issue
- Create a FieldtypeOptions field with multiple checkbox options.
- Apply field to a template and create a page using that template (do not check any checkbox options).
- Create a selector:
$foo = $pages->find("your_checkbox_field=bar")
- Load page to see error.
Setup/Environment
PHP version: 7.4.24
ProcessWire 3.0.165