From e9be5b6015e22fa8b41f47b7eaec2e9c2041a74c Mon Sep 17 00:00:00 2001 From: Jan Schneider Date: Mon, 23 Feb 2009 14:45:25 +0100 Subject: [PATCH] Revert. Horde::callHook is still returning PEAR_Errors rather than raising Exceptions. --- imp/lib/Session.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/imp/lib/Session.php b/imp/lib/Session.php index eef38f44a..6f3e137dd 100644 --- a/imp/lib/Session.php +++ b/imp/lib/Session.php @@ -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; } } -- 2.11.0