From: Michael M Slusarz Date: Mon, 23 Feb 2009 18:18:45 +0000 (-0700) Subject: Partial re-revert; callHook() returns PEAR_Errors but the imp hook throws Exceptions X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=30bf319b13a10fcbccca41ae431996cabd5fa5b5;p=horde.git Partial re-revert; callHook() returns PEAR_Errors but the imp hook throws Exceptions --- 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) { } }