Fix SendGrid error message assignment [MAILPOET-810]
This commit is contained in:
@ -28,7 +28,7 @@ class SendGrid {
|
||||
if(wp_remote_retrieve_response_code($result) !== 200) {
|
||||
$response = json_decode($result['body'], true);
|
||||
$response = (!empty($response['errors'][0])) ?
|
||||
$response['errors'] :
|
||||
$response['errors'][0] :
|
||||
sprintf(__('%s has returned an unknown error.', 'mailpoet'), Mailer::METHOD_SENDGRID);
|
||||
return Mailer::formatMailerSendErrorResult($response);
|
||||
}
|
||||
|
Reference in New Issue
Block a user