Skip to content

Commit a077f04

Browse files
Merge branch '3.4' into 4.4
* 3.4: Various cleanups
1 parent 1088c79 commit a077f04

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Transport/MailgunApiTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,10 @@ protected function doSendApi(SentMessage $sentMessage, Email $email, Envelope $e
6565
$result = $response->toArray(false);
6666
if (200 !== $response->getStatusCode()) {
6767
if ('application/json' === $response->getHeaders(false)['content-type'][0]) {
68-
throw new HttpTransportException(sprintf('Unable to send an email: '.$result['message'].' (code %d).', $response->getStatusCode()), $response);
68+
throw new HttpTransportException('Unable to send an email: '.$result['message'].sprintf(' (code %d).', $response->getStatusCode()), $response);
6969
}
7070

71-
throw new HttpTransportException(sprintf('Unable to send an email: '.$response->getContent(false).' (code %d).', $response->getStatusCode()), $response);
71+
throw new HttpTransportException('Unable to send an email: '.$response->getContent(false).sprintf(' (code %d).', $response->getStatusCode()), $response);
7272
}
7373

7474
$sentMessage->setMessageId($result['id']);

Transport/MailgunHttpTransport.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ protected function doSendHttp(SentMessage $message): ResponseInterface
6767
$result = $response->toArray(false);
6868
if (200 !== $response->getStatusCode()) {
6969
if ('application/json' === $response->getHeaders(false)['content-type'][0]) {
70-
throw new HttpTransportException(sprintf('Unable to send an email: '.$result['message'].' (code %d).', $response->getStatusCode()), $response);
70+
throw new HttpTransportException('Unable to send an email: '.$result['message'].sprintf(' (code %d).', $response->getStatusCode()), $response);
7171
}
7272

73-
throw new HttpTransportException(sprintf('Unable to send an email: '.$response->getContent(false).' (code %d).', $response->getStatusCode()), $response);
73+
throw new HttpTransportException('Unable to send an email: '.$response->getContent(false).sprintf(' (code %d).', $response->getStatusCode()), $response);
7474
}
7575

7676
$message->setMessageId($result['id']);

0 commit comments

Comments
 (0)