diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php index 1adb027f0103fa287f44d6d164d208caa5fad8da..be906c0b7940b701d9f3be574f2c050c7f9abfae 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php +++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php @@ -246,6 +246,8 @@ class AbstractSearch extends AbstractBase $view->results = $this->getResultsManager()->get('EmptySet'); $view->results->setParams($params); $view->results->performAndProcessSearch(); + } else { + throw $e; } } // Save statistics: @@ -255,7 +257,9 @@ class AbstractSearch extends AbstractBase } // Special case: If we're in RSS view, we need to render differently: - if ($view->results->getParams()->getView() == 'rss') { + if (isset($view->results) + && $view->results->getParams()->getView() == 'rss' + ) { $response = $this->getResponse(); $response->getHeaders()->addHeaderLine('Content-type', 'text/xml'); $feed = $this->getViewRenderer()->plugin('resultfeed');