From fb4088836ef2b5d4bec3df3239321f954f449097 Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 6 Nov 2013 21:58:45 -0700 Subject: [PATCH] Make sure we have a valid object --- imp/lib/Factory/Imap.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/imp/lib/Factory/Imap.php b/imp/lib/Factory/Imap.php index b53c63f991d..8fb03a5df4c 100644 --- a/imp/lib/Factory/Imap.php +++ b/imp/lib/Factory/Imap.php @@ -61,6 +61,7 @@ public function create($id = null) } if (!isset($this->_instance[$id])) { + $ob = null; try { $ob = $session->get('imp', 'imap_ob/' . $id); } catch (Exception $e) { @@ -69,7 +70,7 @@ public function create($id = null) throw new Horde_Exception_AuthenticationFailure('', Horde_Auth::REASON_SESSION); } - if (!$ob) { + if (!is_object($ob)) { $ob = (is_null($base)) ? new IMP_Imap($id) : new IMP_Imap_Remote($id);