diff --git a/src/Plugin/facets/widget/MultiselectCheckboxWidget.php b/src/Plugin/facets/widget/MultiselectCheckboxWidget.php index b5d806e0..131308ac 100644 --- a/src/Plugin/facets/widget/MultiselectCheckboxWidget.php +++ b/src/Plugin/facets/widget/MultiselectCheckboxWidget.php @@ -82,10 +82,11 @@ public function build(FacetInterface $facet) { * {@inheritdoc} */ public function prepareValueForUrl(FacetInterface $facet, array &$form, FormStateInterface $form_state): array { - $values = $form_state->getValue($facet->id()); - // Remove "0" values, unchecked checkboxes. - $values = array_filter($values); - return $values; + $values = array_filter($form_state->getValue($facet->id()), function ($value) { + // Remove 0 (integer) values, that are unchecked checkboxes. + // "0" (string) can be a value (for boolean fields). + return $value !== 0; + }); } }