Fix for errors in foreach when you didn't hit compose while in the session.
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 22 Nov 2005 04:18:44 +0000 (04:18 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 22 Nov 2005 04:18:44 +0000 (04:18 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@10397 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/signout.php

index 8706ed9..996d2f8 100644 (file)
@@ -25,8 +25,11 @@ require_once(SM_PATH . 'functions/html.php');
 
 /* Erase any lingering attachments */
 sqgetGlobalVar('compose_messages',  $compose_messages,  SQ_SESSION);
-foreach($compose_messages as $composeMessage) {
-    $composeMessage->purgeAttachments();
+
+if (!empty($compose_message) && is_array($compose_messages)) {
+    foreach($compose_messages as $composeMessage) {
+        $composeMessage->purgeAttachments();
+    }
 }
 
 if (!isset($frame_top)) {