X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fviews%2Fsrc%2FPlugin%2Fviews%2Ffilter%2FInOperator.php;fp=web%2Fcore%2Fmodules%2Fviews%2Fsrc%2FPlugin%2Fviews%2Ffilter%2FInOperator.php;h=1e6682d69aa2cfd02940640d2e4499f0c8e1d285;hp=cff42b9627916541289ab0f59e9f63f0873a7085;hb=af6d1fb995500ae68849458ee10d66abbdcfb252;hpb=680c79a86e3ed402f263faeac92e89fb6d9edcc0 diff --git a/web/core/modules/views/src/Plugin/views/filter/InOperator.php b/web/core/modules/views/src/Plugin/views/filter/InOperator.php index cff42b962..1e6682d69 100644 --- a/web/core/modules/views/src/Plugin/views/filter/InOperator.php +++ b/web/core/modules/views/src/Plugin/views/filter/InOperator.php @@ -229,7 +229,9 @@ class InOperator extends FilterPluginBase { '#default_value' => $default_value, // These are only valid for 'select' type, but do no harm to checkboxes. '#multiple' => TRUE, - '#size' => count($options) > 8 ? 8 : count($options), + // The value options can be a multidimensional array if the value form + // type is a select list, so make sure that they are counted correctly. + '#size' => min(count($options, COUNT_RECURSIVE), 8), ]; $user_input = $form_state->getUserInput(); if ($exposed && !isset($user_input[$identifier])) {