Revert. Horde::callHook is still returning PEAR_Errors rather than raising Exceptions.
authorJan Schneider <jan@horde.org>
Mon, 23 Feb 2009 13:45:25 +0000 (14:45 +0100)
committerJan Schneider <jan@horde.org>
Mon, 23 Feb 2009 13:45:25 +0000 (14:45 +0100)
imp/lib/Session.php

index eef38f4..6f3e137 100644 (file)
@@ -79,10 +79,9 @@ class IMP_Session
         /* Run the username through virtualhost expansion functions if
          * necessary. */
         if (!empty($conf['hooks']['vinfo'])) {
-            try {
-                $imapuser = Horde::callHook('_imp_hook_vinfo', array('username', $imapuser), 'imp');
-            } catch (Horde_Exception $e) {
-                Horde::logMessage($e, __FILE__, __LINE__, PEAR_LOG_ERR);
+            $hook_user = Horde::callHook('_imp_hook_vinfo', array('username', $imapuser), 'imp');
+            if (!is_a($hook_user, 'PEAR_Error')) {
+                $imapuser = $hook_user;
             }
         }