From 3e121d10c905a04b69733c4c8dbdeb375b265b45 Mon Sep 17 00:00:00 2001
From: Ere Maijala <ere.maijala@helsinki.fi>
Date: Sat, 24 Oct 2020 16:06:36 +0300
Subject: [PATCH] Treat invalid date errors from Solr as parser errors. (#1763)

---
 module/VuFind/src/VuFind/Search/Solr/V4/ErrorListener.php | 1 +
 1 file changed, 1 insertion(+)

diff --git a/module/VuFind/src/VuFind/Search/Solr/V4/ErrorListener.php b/module/VuFind/src/VuFind/Search/Solr/V4/ErrorListener.php
index ab65dc0843d..82ce87ea516 100644
--- a/module/VuFind/src/VuFind/Search/Solr/V4/ErrorListener.php
+++ b/module/VuFind/src/VuFind/Search/Solr/V4/ErrorListener.php
@@ -102,6 +102,7 @@ class ErrorListener extends AbstractErrorListener
             $reason = $body->error->msg;
             if (stristr($reason, 'org.apache.solr.search.SyntaxError')
                 || stristr($reason, 'undefined field')
+                || stristr($reason, 'invalid date')
             ) {
                 $tags[] = self::TAG_PARSER_ERROR;
             }
-- 
GitLab