From d29e9a9e254c03ddf1851a3af88c82b617ca3673 Mon Sep 17 00:00:00 2001
From: Thomas Jarosch <thomas.jarosch@intra2net.com>
Date: Wed, 7 Aug 2013 14:43:16 +0200
Subject: [PATCH] Only call $registry->isAdmin() if registry is already
 available


Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
---
 framework/Core/lib/Horde/ErrorHandler.php | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/framework/Core/lib/Horde/ErrorHandler.php b/framework/Core/lib/Horde/ErrorHandler.php
index 4571e5f..c44ba8e 100644
--- a/framework/Core/lib/Horde/ErrorHandler.php
+++ b/framework/Core/lib/Horde/ErrorHandler.php
@@ -82,7 +82,11 @@ HTML;
 
         ob_start();
         try {
-            $admin = $registry->isAdmin();
+            if(is_object($registry) && method_exists($registry, 'isAdmin')) {
+                $admin = $registry->isAdmin();
+            } else {
+                $admin = false;
+            }
 
             echo '<h1>' . Horde_Core_Translation::t("A fatal error has occurred") . '</h1>';
 
-- 
1.8.1.4