From abaa1ce5753b4ca18d7e7268d5397efee347876c Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Fri, 16 Nov 2012 10:44:42 -0500
Subject: [PATCH] Smarter check to avoid notice.

---
 module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php b/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php
index a9e560a7868..cc6caabf64a 100644
--- a/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php
+++ b/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php
@@ -203,7 +203,9 @@ class ResultScroller extends AbstractPlugin
 
                     // if there is something on the next page, then the next
                     // record is the first record on the next page
-                    if (!empty($this->data->nextIds)) {
+                    if (is_array($this->data->nextIds)
+                        && count($this->data->nextIds) > 0
+                    ) {
                         $retVal['nextRecord'] = $this->data->nextIds[0];
                     }
 
-- 
GitLab