From 9f73d1ff74206b8e5d162ba79e0415027b305106 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Fri, 2 Apr 2010 19:01:54 -0600 Subject: [PATCH] This must be a fatal error - nothing we can do about it --- imp/lib/Imap.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/imp/lib/Imap.php b/imp/lib/Imap.php index 8c50a4e62..21b980fe0 100644 --- a/imp/lib/Imap.php +++ b/imp/lib/Imap.php @@ -139,14 +139,11 @@ class IMP_Imap Horde_Imap_Client::$encryptKey = $GLOBALS['injector']->getInstance('Horde_Secret')->getKey('imp'); - $old_error = error_reporting(0); - $this->_ob = unserialize($_SESSION['imp']['imap_ob'][$_SESSION['imp']['server_key']]); - error_reporting($old_error); - + $this->_ob = @unserialize($_SESSION['imp']['imap_ob'][$_SESSION['imp']['server_key']]); if (empty($this->_ob)) { - // @todo How to handle bad unserialize? - // @todo Log message - return false; + /* Throw fatal error here - should never reach here and if we + * do, we are out of luck. */ + throw new IMP_Exception(_("Could not acquire mail server credentials from the session.")); } $this->_postcreate($_SESSION['imp']['protocol']); -- 2.11.0