From f1a6e44f380cd60f6e30b23e994cee7e2f95406c Mon Sep 17 00:00:00 2001
From: Chris Hallberg <crhallberg@gmail.com>
Date: Wed, 17 Dec 2014 14:21:03 -0500
Subject: [PATCH] Check recordtype existance in getSolrRecord.

---
 module/VuFind/src/VuFind/RecordDriver/PluginManager.php | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/module/VuFind/src/VuFind/RecordDriver/PluginManager.php b/module/VuFind/src/VuFind/RecordDriver/PluginManager.php
index 407e0284bf2..5d86f67b28e 100644
--- a/module/VuFind/src/VuFind/RecordDriver/PluginManager.php
+++ b/module/VuFind/src/VuFind/RecordDriver/PluginManager.php
@@ -89,8 +89,12 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
      */
     public function getSolrRecord($data)
     {
-        $key = 'Solr' . ucwords($data['recordtype']);
-        $recordType = $this->has($key) ? $key : 'SolrDefault';
+        if(isset($data['recordtype'])) {
+            $key = 'Solr' . ucwords($data['recordtype']);
+            $recordType = $this->has($key) ? $key : 'SolrDefault';
+        } else {
+            $recordType = 'SolrDefault';
+        }
 
         // Build the object:
         $driver = $this->get($recordType);
-- 
GitLab