Skip to content

Commit

Permalink
Make sure we have a valid object
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Nov 7, 2013
1 parent df54668 commit fb40888
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion imp/lib/Factory/Imap.php
Expand Up @@ -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) {
Expand All @@ -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);
Expand Down

0 comments on commit fb40888

Please sign in to comment.