From 13f69cf42089613a8470decdd5152ababffa1576 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 5 Mar 2013 13:31:17 -0500
Subject: [PATCH] Don't redirect to referer if referer unset (fixes
 VUFIND-751).

---
 .../VuFind/src/VuFind/Controller/MyResearchController.php | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php
index ed5699b9231..6dfc3abcc0c 100644
--- a/module/VuFind/src/VuFind/Controller/MyResearchController.php
+++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php
@@ -64,10 +64,10 @@ class MyResearchController extends AbstractBase
 
         // Not logged in?  Force user to log in:
         if (!$this->getAuthManager()->isLoggedIn()) {
-            $this->followup()->store(
-                array(),
-                $this->getRequest()->getServer()->get('HTTP_REFERER')
-            );
+            $referer = $this->getRequest()->getServer()->get('HTTP_REFERER');
+            if (!empty($referer)) {
+                $this->followup()->store(array(), $referer);
+            }
             return $this->forwardTo('MyResearch', 'Login');
         }
 
-- 
GitLab