Bug description
The fix in #13266 for array_flip() only handles null values via ??, but booleans like false still cause the error:
array_flip(): Can only flip string and integer values, entry skipped
at vendor/statamic/cms/src/Stache/Query/Builder.php:160
I’m still using v5 in many installations, and unfortunately some queries are broken because of this 🤒
How to reproduce
In tinker, simply run for a toggle field:
\Statamic\Facades\Entry::query()->whereIn('any_toggle_field', [false, null])->get();
Logs
Environment
Installation
Fresh statamic/statamic site via CLI
Additional details
possible workaround
->where(function ($q) {
$q->where('my_field', false)
->orWhereNull('my_field');
})