Skip to content

Commit

Permalink
fix an issue with the params
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaloebiz committed Aug 2, 2018
1 parent 63c1c81 commit 1a1cbda
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Mailchimp/Exceptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ public function getFriendlyMessage()
}
$friendlyMessage .= "\tErrors:\n".$errorMessage;
}
$friendlyMessage .= "\tParams:\n\t\t".$this->params;
$lineParams = "\tParams:\n";
if(is_array($this->params)) {
if(count($this->params)) {
$lineParams .= "\t\t" . json_encode($this->params);
} else {
$lineParams = "";
}
} else {
$lineParams = $this->params;
}
$friendlyMessage .= $lineParams;
return $friendlyMessage;
}
public function getUrl()
Expand Down

0 comments on commit 1a1cbda

Please sign in to comment.