From: Michael M Slusarz Date: Sat, 3 Apr 2010 01:01:54 +0000 (-0600) Subject: This must be a fatal error - nothing we can do about it X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9f73d1ff74206b8e5d162ba79e0415027b305106;p=horde.git This must be a fatal error - nothing we can do about it --- 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']);