}
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 {