From: stekkel Date: Wed, 21 Aug 2002 10:09:15 +0000 (+0000) Subject: fix for getEntity and the return of a non-object X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=a2aea42e4458e81c53610197538144830c0eb443 fix for getEntity and the return of a non-object git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@3383 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/class/mime.class.php b/class/mime.class.php index 66767315..8d1def3d 100644 --- a/class/mime.class.php +++ b/class/mime.class.php @@ -717,10 +717,13 @@ class message $msg = $msg->entities[0]; } - if (isset($msg->entities[($ent_a[$cnt-1])-1])) + if (isset($msg->entities[($ent_a[$cnt-1])-1])) { - $msg = $msg->entities[($ent_a[$cnt-1]-1)]; - } + if (is_object($msg->entities[($ent_a[$cnt-1])-1])) + { + $msg = $msg->entities[($ent_a[$cnt-1]-1)]; + } + } return $msg; }