From 9e3ad3e637dd92cb7796a4092df19f37ecb13a7d Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Wed, 5 Sep 2012 13:05:39 -0400
Subject: [PATCH] Load empty results using search manager.

---
 module/VuFind/src/VuFind/Controller/AbstractSearch.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php
index 96b7aef1f13..876017b21b2 100644
--- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php
+++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php
@@ -221,7 +221,8 @@ class AbstractSearch extends AbstractBase
                 // We need to create and process an "empty results" object to
                 // ensure that recommendation modules and templates behave
                 // properly when displaying the error message.
-                $view->results = new \VuFind\Search\EmptySet\Results($params);
+                $view->results = $this->getSearchManager()
+                    ->setSearchClassId('EmptySet')->getResults($params);
                 $view->results->performAndProcessSearch();
             } else {
                 // Unexpected error -- let's throw this up to the next level.
-- 
GitLab