diff --git a/core/modules/views/src/Plugin/views/filter/Date.php b/core/modules/views/src/Plugin/views/filter/Date.php index 5928023..7dcc452 100644 --- a/core/modules/views/src/Plugin/views/filter/Date.php +++ b/core/modules/views/src/Plugin/views/filter/Date.php @@ -131,7 +131,13 @@ public function acceptExposedInput($input) { } // Store this because it will get overwritten. - $type = $this->value['type']; + if (array_key_exists('type', $this->value)) { + $type = $this->value['type']; + $restore_type = TRUE; + } + else { + $restore_type = FALSE; + } $rc = parent::acceptExposedInput($input); // Don't filter if value(s) are empty. @@ -155,7 +161,12 @@ public function acceptExposedInput($input) { } // restore what got overwritten by the parent. - $this->value['type'] = $type; + if ($restore_type) { + $this->value['type'] = $type; + } + else { + unset($this->value['type']); + } return $rc; }