diff --git a/core/modules/views/src/Plugin/views/filter/BooleanOperator.php b/core/modules/views/src/Plugin/views/filter/BooleanOperator.php index 1eb9ef1e39..8433f43f5b 100644 --- a/core/modules/views/src/Plugin/views/filter/BooleanOperator.php +++ b/core/modules/views/src/Plugin/views/filter/BooleanOperator.php @@ -254,17 +254,18 @@ public function adminSummary() { return $this->t('exposed'); } if (empty($this->valueOptions)) { - if (in_array($this->operator, $this->operatorValues(1), TRUE)) { - $this->getValueOptions(); - // Now that we have the valid options for this filter, just return the - // human-readable label based on the current value. The valueOptions - // array is keyed with either 0 or 1, so if the current value is not - // empty, use the label for 1, and if it's empty, use the label for 0. - return $this->operator . ' ' . $this->valueOptions[!empty($this->value)]; - } - - return $this->operator; + $this->getValueOptions(); } + if (in_array($this->operator, $this->operatorValues(1), TRUE)) { + $this->getValueOptions(); + // Now that we have the valid options for this filter, just return the + // human-readable label based on the current value. The valueOptions + // array is keyed with either 0 or 1, so if the current value is not + // empty, use the label for 1, and if it's empty, use the label for 0. + return $this->operator . ' ' . $this->valueOptions[!empty($this->value)]; + } + + return $this->operator; } public function defaultExposeOptions() {