If From: field is unset in an email, header object for from field is not
authorjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 10 Apr 2005 02:50:13 +0000 (02:50 +0000)
committerjangliss <jangliss@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 10 Apr 2005 02:50:13 +0000 (02:50 +0000)
correctly set, and generates an error on reply (#1179754).

git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9234 7612ce4b-ef26-0410-bec9-ea0150e637f0

ChangeLog
src/compose.php

index e02428617239b2fb1f359fe4b12b742f153ffa27..a38166aeea4663056622793606ead70dc29d1333 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -308,6 +308,8 @@ Version 1.5.1 -- CVS
   - If default SquirrelMail language is set to empty string, interface will 
     try to follow browser's HTTP_ACCEPT_LANGUAGE header or fallback to en_US
     (#764709).
   - If default SquirrelMail language is set to empty string, interface will 
     try to follow browser's HTTP_ACCEPT_LANGUAGE header or fallback to en_US
     (#764709).
+  - If From: field is unset in an email, header object for from field is not
+    correctly set, and generates an error on reply (#1179754).
   
 Version 1.5.0 - 2 February 2004
 -------------------------------
   
 Version 1.5.0 - 2 February 2004
 -------------------------------
index bc93c0d99ded1949f8b505d147fd90711749936c..0e30edb84609c45cabd6059e91332818db026f1d 100644 (file)
@@ -170,7 +170,11 @@ function getReplyCitation($orig_from, $orig_date) {
     global $reply_citation_style, $reply_citation_start, $reply_citation_end;
 
     // FIXME: why object is rewritten with string.
     global $reply_citation_style, $reply_citation_start, $reply_citation_end;
 
     // FIXME: why object is rewritten with string.
-    $orig_from = decodeHeader($orig_from->getAddress(false),false,false,true);
+    if (!is_object($orig_from)) {
+        $orig_from = '';
+    } else {
+        $orig_from = decodeHeader($orig_from->getAddress(false),false,false,true);
+    }
 //    $from = decodeHeader($orig_header->getAddr_s('from',"\n$indent"),false,false);
 
     /* First, return an empty string when no citation style selected. */
 //    $from = decodeHeader($orig_header->getAddr_s('from',"\n$indent"),false,false);
 
     /* First, return an empty string when no citation style selected. */
@@ -1619,4 +1623,4 @@ function deliverMessage($composeMessage, $draft=false) {
 }
 
 // vim: et ts=4
 }
 
 // vim: et ts=4
-?>
\ No newline at end of file
+?>