Need to registry the deprecated callback *after* the autoloader is initialized.
authorMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 17 Mar 2010 21:14:47 +0000 (17:14 -0400)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Wed, 17 Mar 2010 21:15:56 +0000 (17:15 -0400)
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
horde/lib/core.php

index 1471cb8..2534556 100644 (file)
@@ -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');
             }
index 63490cf..17725e0 100644 (file)
@@ -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);
-}