From 87562acdb7337553fcbb432b9bbff4307136c8b2 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Wed, 17 Mar 2010 17:14:47 -0400 Subject: [PATCH] Need to registry the deprecated callback *after* the autoloader is initialized. Horde::logDeprecated() now uses Horde_Log, so the autoloader needs to be initialized before we attempt to log anything. --- framework/Core/lib/Horde/Registry.php | 4 ++++ horde/lib/core.php | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/framework/Core/lib/Horde/Registry.php b/framework/Core/lib/Horde/Registry.php index 1471cb813..25345568f 100644 --- a/framework/Core/lib/Horde/Registry.php +++ b/framework/Core/lib/Horde/Registry.php @@ -184,6 +184,10 @@ class Horde_Registry try { $GLOBALS['registry']->pushApp($app, array('check_perms' => ($args['authentication'] != 'none'), 'logintasks' => !$args['nologintasks'])); + /* Catch and log E_DEPRECATED errors. */ + if (defined('E_DEPRECATED')) { + set_error_handler(array('Horde', 'logDeprecated'), E_DEPRECATED); + } if ($args['admin'] && !Horde_Auth::isAdmin()) { throw new Horde_Exception('Not an admin'); } diff --git a/horde/lib/core.php b/horde/lib/core.php index 63490cf90..17725e0bb 100644 --- a/horde/lib/core.php +++ b/horde/lib/core.php @@ -42,7 +42,3 @@ Horde_Autoloader::addClassPattern('/^Horde(?:$|_)/i', dirname(__FILE__)); * output this unless an admin. */ set_exception_handler(array('Horde', 'fatal')); -/* Catch and log E_DEPRECATED errors. */ -if (defined('E_DEPRECATED')) { - set_error_handler(array('Horde', 'logDeprecated'), E_DEPRECATED); -} -- 2.11.0