From c4b0c01ff17dbe6e210c0d7cef36333c20a8acbd Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 25 Oct 2016 15:02:33 -0400
Subject: [PATCH] Default to empty params if missing. - Helps with mocked
 testing environment; probably not necessary "in reality."

---
 module/VuFind/src/VuFind/View/Helper/Root/RecordLink.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/View/Helper/Root/RecordLink.php b/module/VuFind/src/VuFind/View/Helper/Root/RecordLink.php
index be65d2c35cf..f052b2efc78 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/RecordLink.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/RecordLink.php
@@ -119,7 +119,7 @@ class RecordLink extends \Zend\View\Helper\AbstractHelper
         // Build the URL:
         $urlHelper = $this->getView()->plugin('url');
         $details = $this->router->getActionRouteDetails($driver, $action);
-        return $urlHelper($details['route'], $details['params']);
+        return $urlHelper($details['route'], $details['params'] ?: []);
     }
 
     /**
-- 
GitLab