From f3c3a41463bf045bd41d73d69058cbd63d7acace Mon Sep 17 00:00:00 2001 From: Stephen Bussey Date: Fri, 27 Dec 2013 17:14:37 -0500 Subject: [PATCH] Change SendGridService to use array access for errors instead of object access --- src/SlmMail/Service/SendGridService.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/SlmMail/Service/SendGridService.php b/src/SlmMail/Service/SendGridService.php index f2ced99..00911c7 100644 --- a/src/SlmMail/Service/SendGridService.php +++ b/src/SlmMail/Service/SendGridService.php @@ -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'; }