From a83812b9d6cd2375b2ba01412f8287951f3d4de9 Mon Sep 17 00:00:00 2001 From: SoloJr Date: Thu, 13 May 2021 20:04:02 +0300 Subject: [PATCH] bugfix/ternary_operator fixed issue --- MangoPay/Libraries/RestTool.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MangoPay/Libraries/RestTool.php b/MangoPay/Libraries/RestTool.php index 9455aa31..ba287d4e 100644 --- a/MangoPay/Libraries/RestTool.php +++ b/MangoPay/Libraries/RestTool.php @@ -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;