From 30bf319b13a10fcbccca41ae431996cabd5fa5b5 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Mon, 23 Feb 2009 11:18:45 -0700 Subject: [PATCH] Partial re-revert; callHook() returns PEAR_Errors but the imp hook throws Exceptions --- imp/lib/Session.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/imp/lib/Session.php b/imp/lib/Session.php index 6f3e137dd..c686d85bf 100644 --- a/imp/lib/Session.php +++ b/imp/lib/Session.php @@ -79,9 +79,12 @@ class IMP_Session /* Run the username through virtualhost expansion functions if * necessary. */ if (!empty($conf['hooks']['vinfo'])) { - $hook_user = Horde::callHook('_imp_hook_vinfo', array('username', $imapuser), 'imp'); - if (!is_a($hook_user, 'PEAR_Error')) { - $imapuser = $hook_user; + try { + $hook_user = Horde::callHook('_imp_hook_vinfo', array('username', $imapuser), 'imp'); + if (!is_a($hook_user, 'PEAR_Error')) { + $imapuser = $hook_user; + } + } catch (Horde_Exception $e) { } } -- 2.11.0