From: Michael M Slusarz Date: Sat, 4 Sep 2010 08:16:28 +0000 (-0600) Subject: Catch bad Imap client unserializations X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=737287f936de0dce9beb554aeb117ad7fc7cabe0;p=horde.git Catch bad Imap client unserializations --- diff --git a/imp/lib/Imap.php b/imp/lib/Imap.php index 8ebb94841..215a415c7 100644 --- a/imp/lib/Imap.php +++ b/imp/lib/Imap.php @@ -101,8 +101,9 @@ class IMP_Imap return false; } - $this->ob = @unserialize($_SESSION['imp']['imap_ob'][$this->_serverkey]); - if (empty($this->ob)) { + try { + $this->ob = @unserialize($_SESSION['imp']['imap_ob'][$this->_serverkey]); + } catch (Exception $e) { /* 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."));