From e3974b856bfb1933f00a45b8e6fbe2a642ba3c5a Mon Sep 17 00:00:00 2001
From: Denis <ki11d0z3@gmail.com>
Date: Thu, 7 Jul 2022 13:42:17 +0300
Subject: [PATCH 1/2] Issue #3294700: Warning: Undefined array key "type" in
 Drupal\views\Plugin\views\filter\Date->acceptExposedInput()

---
 core/modules/views/src/Plugin/views/filter/Date.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php
index 9aa8168f0878..b2b76418d6a5 100644
--- a/core/modules/views/src/Plugin/views/filter/Date.php
+++ b/core/modules/views/src/Plugin/views/filter/Date.php
@@ -124,7 +124,7 @@ public function acceptExposedInput($input) {
     // Store this because it will get overwritten.
     $type = NULL;
     if ($this->isAGroup()) {
-      if (is_array($this->group_info)) {
+      if (!empty($this->group_info['type'])) {
         $type = $this->group_info['type'];
       }
     }
-- 
GitLab


From 56afcd081c3e404bca2a7526bad64e82c6c1b30f Mon Sep 17 00:00:00 2001
From: Bharath Kondeti <bharath122334@gmail.com>
Date: Fri, 5 May 2023 18:25:41 +0530
Subject: [PATCH 2/2] Fixed few more warnings due to grouped filters.

---
 core/modules/views/src/Plugin/views/filter/Date.php        | 7 +++++--
 .../views/src/Plugin/views/filter/NumericFilter.php        | 5 ++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php
index b2b76418d6a5..7f67a37d7790 100644
--- a/core/modules/views/src/Plugin/views/filter/Date.php
+++ b/core/modules/views/src/Plugin/views/filter/Date.php
@@ -124,7 +124,7 @@ public function acceptExposedInput($input) {
     // Store this because it will get overwritten.
     $type = NULL;
     if ($this->isAGroup()) {
-      if (!empty($this->group_info['type'])) {
+      if (is_array($this->group_info) && isset($this->group_info['type'])) {
         $type = $this->group_info['type'];
       }
     }
@@ -150,13 +150,16 @@ public function acceptExposedInput($input) {
     if ($operators[$operator]['values'] == 1) {
       // When the operator is either <, <=, =, !=, >=, > or regular_expression
       // the input contains only one value.
-      if ($this->value['value'] == '') {
+      if (isset($this->value['value']) && $this->value['value'] == '') {
         return FALSE;
       }
     }
     elseif ($operators[$operator]['values'] == 2) {
       // When the operator is either between or not between the input contains
       // two values.
+      if (!isset($this->value['min']) || !isset($this->value['max'])) {
+        return FALSE;
+      }
       if ($this->value['min'] == '' || $this->value['max'] == '') {
         return FALSE;
       }
diff --git a/core/modules/views/src/Plugin/views/filter/NumericFilter.php b/core/modules/views/src/Plugin/views/filter/NumericFilter.php
index 30556125ab5f..bb545ae5106f 100644
--- a/core/modules/views/src/Plugin/views/filter/NumericFilter.php
+++ b/core/modules/views/src/Plugin/views/filter/NumericFilter.php
@@ -423,12 +423,15 @@ public function acceptExposedInput($input) {
       if (!empty($info[$this->operator]['values'])) {
         switch ($info[$this->operator]['values']) {
           case 1:
-            if ($value['value'] === '') {
+            if (!isset($value['value']) || $value['value'] === '') {
               return FALSE;
             }
             break;
 
           case 2:
+            if (!isset($value['min']) || !isset($value['max'])) {
+              return FALSE;
+            }
             if ($value['min'] === '' && $value['max'] === '') {
               return FALSE;
             }
-- 
GitLab

