Fix PHP notices
authorpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 1 Apr 2012 20:35:47 +0000 (20:35 +0000)
committerpdontthink <pdontthink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Sun, 1 Apr 2012 20:35:47 +0000 (20:35 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@14306 7612ce4b-ef26-0410-bec9-ea0150e637f0

src/compose.php

index fb0a9c57f5af6233667736e6e71d4165b933c0b4..09cf6c3895735d8ba88c60b2f8058c3f9133f4ff 100644 (file)
@@ -1751,14 +1751,16 @@ function deliverMessage(&$composeMessage, $draft=false) {
     }
     if (!$success) {
         // $deliver->dlv_server_msg is not always server's reply
-        $msg = _("Message not sent.") . "<br />\n" .
-            $deliver->dlv_msg;
+        $msg = _("Message not sent.")
+             . "<br />\n"
+             . (isset($deliver->dlv_msg) ? $deliver->dlv_msg : '');
         if (!empty($deliver->dlv_server_msg)) {
             // add 'server replied' part only when it is not empty.
             // Delivery error can be generated by delivery class itself
-            $msg.='<br />' .
-                _("Server replied:") . ' ' . $deliver->dlv_ret_nr . ' ' .
-                nl2br(htmlspecialchars($deliver->dlv_server_msg));
+            $msg .= '<br />'
+                  . _("Server replied:") . ' '
+                  . (isset($deliver->dlv_ret_nr) ? $deliver->dlv_ret_nr . ' ' : '')
+                  . nl2br(htmlspecialchars($deliver->dlv_server_msg));
         }
         plain_error_message($msg);
     } else {