Skip to content

Commit

Permalink
Merge pull request #60 from sb8244/master
Browse files Browse the repository at this point in the history
Change SendGridService to use array access for errors instead of object ...
  • Loading branch information
bakura10 committed Dec 28, 2013
2 parents c228975 + f3c3a41 commit d101335
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/SlmMail/Service/SendGridService.php
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ private function parseResponse(HttpResponse $response)

// There is a 4xx error
if ($response->isClientError()) {
if (isset($result->errors) && is_array($result->errors)) {
$message = implode(', ', $result->errors);
} elseif (isset($result->error)) {
$message = $result->error;
if (isset($result['errors']) && is_array($result['errors'])) {
$message = implode(', ', $result['errors']);
} elseif (isset($result['error'])) {
$message = $result['error'];
} else {
$message = 'Unknown error';
}
Expand Down

0 comments on commit d101335

Please sign in to comment.