Skip to content

Commit

Permalink
Merge pull request #62 from ebizmarts/Issue-60
Browse files Browse the repository at this point in the history
closes #60
  • Loading branch information
gonzaloebiz authored Dec 9, 2024
2 parents 42840d1 + 34011ae commit 0dfea99
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Mailchimp/Error.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ public function getFriendlyMessage()
$error['title'] = $this->title . " for Api Call: [" . $this->url. "] using method [".$this->method."]";
$error['detail'] = $this->detail;
if(is_array($this->errors)) {
foreach ($this->errors as $error) {
$field = array_key_exists('field', $error) ? $error['field'] : '';
$message = array_key_exists('message', $error) ? $error['message'] : '';
foreach ($this->errors as $errors) {
$field = array_key_exists('field', $errors) ? $errors['field'] : '';
$message = array_key_exists('message', $errors) ? $errors['message'] : '';
$error['field'][$field] = $message;
}
}
Expand Down

0 comments on commit 0dfea99

Please sign in to comment.