If From: field is unset in an email, header object for from field is not
[squirrelmail.git] / src / compose.php
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.
-    $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. */
@@ -1619,4 +1623,4 @@ function deliverMessage($composeMessage, $draft=false) {
 }
 
 // vim: et ts=4
-?>
\ No newline at end of file
+?>