Skip to content

Commit

Permalink
Merge pull request #487 from Mangopay/bugfix/error_handler_ternary_issue
Browse files Browse the repository at this point in the history
bugfix/ternary_operator fixed issue
  • Loading branch information
SoloJr authored May 27, 2021
2 parents a33ce8d + a83812b commit 098b9b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MangoPay/Libraries/RestTool.php
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,9 @@ private function CheckResponseCode($responseCode, $response)
if (isset($response) && is_object($response) && isset($response->Message)) {
$error = new Error();
$error->Message = $response->Message;
$error->Errors = (property_exists($response, 'Errors')
$error->Errors = property_exists($response, 'Errors')
? $response->Errors
: property_exists($response, 'errors')) ? $response->errors : null;
: (property_exists($response, 'errors') ? $response->errors : null);
$error->Id = property_exists($response, 'Id') ? $response->Id : null;
$error->Type = property_exists($response, 'Type') ? $response->Type : null;
$error->Date = property_exists($response, 'Date') ? $response->Date : null;
Expand Down

0 comments on commit 098b9b4

Please sign in to comment.