From c33a6449a2b194d815ce71e517f6b89715d6d8ca Mon Sep 17 00:00:00 2001
From: Tim Steiner <tsteiner2@unl.edu>
Date: Tue, 17 Apr 2012 22:12:20 +0000
Subject: [PATCH] Fix a bug when no Zend_Log is registered with Zend_Registry
 as 'log'.

---
 library/Unl/XsrfToken.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/Unl/XsrfToken.php b/library/Unl/XsrfToken.php
index 3713afa..b31e745 100644
--- a/library/Unl/XsrfToken.php
+++ b/library/Unl/XsrfToken.php
@@ -75,7 +75,7 @@ class Unl_XsrfToken
      */
     public function verify($tokenId, $onceOnly = TRUE)
     {
-        if (Zend_Registry::get('log') instanceof Zend_Log) {
+        if (Zend_Registry::isRegistered('log') && Zend_Registry::get('log') instanceof Zend_Log) {
             $log = Zend_Registry::get('log');
         } else {
             $log = new Zend_Log();
-- 
GitLab