diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php index b7d1821bfd..19eeae55e5 100644 --- a/core/modules/views/src/Plugin/views/filter/Date.php +++ b/core/modules/views/src/Plugin/views/filter/Date.php @@ -182,7 +182,7 @@ protected function opBetween($field) { } protected function opSimple($field) { - $value = intval(strtotime($this->value['value'], 0)); + $value = intval(strtotime($this->value['value'] ?? $this->value, 0)); if (!empty($this->value['type']) && $this->value['type'] == 'offset') { // Keep sign. $value = '***CURRENT_TIME***' . sprintf('%+d', $value); diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php index 05d0cc8979..0830178a2c 100644 --- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php +++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php @@ -354,7 +354,7 @@ protected function opBetween($field) { } protected function opSimple($field) { - $this->query->addWhere($this->options['group'], $field, $this->value['value'], $this->operator); + $this->query->addWhere($this->options['group'], $field, $this->value['value'] ?? $this->value, $this->operator); } protected function opEmpty($field) { diff --git a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php index a0bbedf731..88c32128e4 100644 --- a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php +++ b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php @@ -263,7 +263,8 @@ public function buildJoin($select_query, $table, $view_query) { if ($this->leftTable) { $left_table = $view_query->getTableInfo($this->leftTable); - $left_field = "$left_table[alias].$this->leftField"; + $left_table_alias = $left_table['alias'] ?? $left_table; + $left_field = "$left_table_alias.$this->leftField"; } else { // This can be used if left_field is a formula or something. It should be used only *very* rarely. @@ -381,7 +382,8 @@ protected function buildExtra($info, &$arguments, $table, SelectInterface $selec // Allow the value to be set either with the 'value' element or // with 'left_field'. if (isset($info['left_field'])) { - $placeholder_sql = "$left[alias].$info[left_field]"; + $left_alias = $left['alias'] ?? NULL; + $placeholder_sql = "$left_alias.$info[left_field]"; } else { $arguments[$placeholder] = $info['value'];