- fix notice when returning from a restored compose session.
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 8 Jun 2007 16:40:37 +0000 (16:40 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Fri, 8 Jun 2007 16:40:37 +0000 (16:40 +0000)
- 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

index 96b7444ffb1102c57193bdfc15bf188797d96f6e..2614ffdd4a5a1ddad3f7f012057962647bbb8093 100644 (file)
@@ -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;
 }
-?>