Merge pull request #10055 from MarkusBauer/v2.x/mail-error-message

Fixing a broken error message in MailTransport
This commit is contained in:
José Lorenzo Rodríguez 2017-01-17 20:35:51 +01:00 committed by GitHub
commit 7ba160bf95

View file

@ -72,12 +72,12 @@ class MailTransport extends AbstractTransport {
//@codingStandardsIgnoreStart
if (!@mail($to, $subject, $message, $headers)) {
$error = error_get_last();
$msg = 'Could not send email: ' . isset($error['message']) ? $error['message'] : 'unknown';
$msg = 'Could not send email: ' . (isset($error['message']) ? $error['message'] : 'unknown');
throw new SocketException($msg);
}
} elseif (!@mail($to, $subject, $message, $headers, $params)) {
$error = error_get_last();
$msg = 'Could not send email: ' . isset($error['message']) ? $error['message'] : 'unknown';
$msg = 'Could not send email: ' . (isset($error['message']) ? $error['message'] : 'unknown');
//@codingStandardsIgnoreEnd
throw new SocketException($msg);
}