diff --git a/src/Plugin/search_api/processor/EDTFYear.php b/src/Plugin/search_api/processor/EDTFYear.php index 1d759f4..438be8d 100644 --- a/src/Plugin/search_api/processor/EDTFYear.php +++ b/src/Plugin/search_api/processor/EDTFYear.php @@ -182,7 +182,7 @@ public function addFieldValues(ItemInterface $item) { } else { $end_year = (empty($this->configuration['open_end_year'])) ? date('Y') : $this->configuration['open_end_year']; - $edtf = str_replace('/..', '/' . $this->configuration['open_end_year'], $edtf); + $edtf = str_replace('/..', '/' . $end_year, $edtf); } } // Open end dates with `/`. @@ -192,7 +192,7 @@ public function addFieldValues(ItemInterface $item) { } else { $end_year = (empty($this->configuration['open_end_year'])) ? date('Y') : $this->configuration['open_end_year']; - $edtf = str_replace('/', '/' . $this->configuration['open_end_year'], $edtf); + $edtf = str_replace('/', '/' . $end_year, $edtf); } } $parsed = $parser->parse($edtf)->getEdtfValue();