From ca8a7efc688b84f246e326836dc79f7f6d31a8c1 Mon Sep 17 00:00:00 2001 From: kink Date: Fri, 8 Jun 2007 16:40:37 +0000 Subject: [PATCH] - fix notice when returning from a restored compose session. - there's no need to urldecode the restored session parameter. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@12442 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- src/compose.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compose.php b/src/compose.php index 96b7444f..2614ffdd 100644 --- a/src/compose.php +++ b/src/compose.php @@ -332,7 +332,7 @@ if (sqsession_is_registered('session_expired_post')) { } } - $compose_messages = unserialize(urldecode($restoremessages)); + $compose_messages = unserialize($restoremessages); sqsession_register($compose_messages,'compose_messages'); sqsession_register($composesession,'composesession'); if (isset($send)) { @@ -1252,7 +1252,8 @@ function showInputForm ($session, $values=false) { } $attach = array(); - if ($composeMessage->entities) { + // composeMessage can be empty when coming from a restored session + if (is_object($composeMessage) && $composeMessage->entities) { foreach ($composeMessage->entities as $key => $attachment) { $attached_file = $attachment->att_local_name; if ($attachment->att_local_name || $attachment->body_part) { @@ -1674,4 +1675,3 @@ function deliverMessage($composeMessage, $draft=false) { } return $success; } -?> -- 2.25.1