mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Merge pull request #10055 from MarkusBauer/v2.x/mail-error-message
Fixing a broken error message in MailTransport
This commit is contained in:
commit
7ba160bf95
1 changed files with 2 additions and 2 deletions
|
@ -72,12 +72,12 @@ class MailTransport extends AbstractTransport {
|
||||||
//@codingStandardsIgnoreStart
|
//@codingStandardsIgnoreStart
|
||||||
if (!@mail($to, $subject, $message, $headers)) {
|
if (!@mail($to, $subject, $message, $headers)) {
|
||||||
$error = error_get_last();
|
$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);
|
throw new SocketException($msg);
|
||||||
}
|
}
|
||||||
} elseif (!@mail($to, $subject, $message, $headers, $params)) {
|
} elseif (!@mail($to, $subject, $message, $headers, $params)) {
|
||||||
$error = error_get_last();
|
$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
|
//@codingStandardsIgnoreEnd
|
||||||
throw new SocketException($msg);
|
throw new SocketException($msg);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue