Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / views / src / Plugin / views / filter / ManyToOne.php
index e678dee82f3f9c38ee6be2f6059bc4a79ec477f4..86eb1f3361bae7edee38fbe98064c9c9447e0ef9 100644 (file)
@@ -129,6 +129,9 @@ class ManyToOne extends InOperator {
     if (empty($this->value)) {
       return;
     }
+    // Form API returns unchecked options in the form of option_id => 0. This
+    // breaks the generated query for "is all of" filters so we remove them.
+    $this->value = array_filter($this->value, 'static::arrayFilterZero');
     $this->helper->addFilter();
   }