X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=web%2Fcore%2Fmodules%2Fviews%2Fsrc%2FPlugin%2Fviews%2Ffilter%2FManyToOne.php;fp=web%2Fcore%2Fmodules%2Fviews%2Fsrc%2FPlugin%2Fviews%2Ffilter%2FManyToOne.php;h=86eb1f3361bae7edee38fbe98064c9c9447e0ef9;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hp=e678dee82f3f9c38ee6be2f6059bc4a79ec477f4;hpb=aea91e65e895364e460983b890e295aa5d5540a5;p=yaffs-website diff --git a/web/core/modules/views/src/Plugin/views/filter/ManyToOne.php b/web/core/modules/views/src/Plugin/views/filter/ManyToOne.php index e678dee82..86eb1f336 100644 --- a/web/core/modules/views/src/Plugin/views/filter/ManyToOne.php +++ b/web/core/modules/views/src/Plugin/views/filter/ManyToOne.php @@ -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(); }