diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php index ec951f08cd..baa27b70f4 100644 --- a/core/modules/views/src/Plugin/views/filter/Date.php +++ b/core/modules/views/src/Plugin/views/filter/Date.php @@ -182,6 +182,9 @@ protected function opBetween($field) { } protected function opSimple($field) { + // @todo $this->value['value'] should always be defined, but it's not + // and that's leading to test failures in PHP 7.4. Figure out a more + // robust solution rather than coalescing to NULL. $value = intval(strtotime($this->value['value'] ?? NULL, 0)); if (!empty($this->value['type']) && $this->value['type'] == 'offset') { // Keep sign. diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php index 71aadbfba2..4f9680ec57 100644 --- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php +++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php @@ -354,6 +354,9 @@ protected function opBetween($field) { } protected function opSimple($field) { + // @todo $this->value['value'] should always be defined, but it's not + // and that's leading to test failures in PHP 7.4. Figure out a more + // robust solution rather than coalescing to NULL. $this->query->addWhere($this->options['group'], $field, $this->value['value'] ?? NULL, $this->operator); } diff --git a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php index dcb445d053..1788ec63a7 100644 --- a/core/modules/views/src/Plugin/views/join/JoinPluginBase.php +++ b/core/modules/views/src/Plugin/views/join/JoinPluginBase.php @@ -263,6 +263,9 @@ public function buildJoin($select_query, $table, $view_query) { if ($this->leftTable) { $left_table = $view_query->getTableInfo($this->leftTable); + // @todo $left_table['alias'] should always be defined, but it's not + // and that's leading to test failures in PHP 7.4. Figure out a more + // robust solution rather than coalescing to NULL. $left_table_alias = $left_table['alias'] ?? NULL; $left_field = "$left_table_alias.$this->leftField"; } @@ -382,6 +385,9 @@ 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'])) { + // @todo $left['alias'] should always be defined, but it's not + // and that's leading to test failures in PHP 7.4. Figure out a more + // robust solution rather than coalescing to NULL. $left_alias = $left['alias'] ?? NULL; $placeholder_sql = "$left_alias.$info[left_field]"; }