From f11452aea96301935b59679c7160f1416e248481 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 13 Mar 2024 16:42:33 +1100 Subject: [PATCH] Ensure square object existing --- app/PaymentDrivers/Square/CreditCard.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/PaymentDrivers/Square/CreditCard.php b/app/PaymentDrivers/Square/CreditCard.php index 167744331d..da53d36a26 100644 --- a/app/PaymentDrivers/Square/CreditCard.php +++ b/app/PaymentDrivers/Square/CreditCard.php @@ -271,7 +271,7 @@ class CreditCard implements MethodInterface $errors = $api_response->getErrors(); } - if (property_exists($customers, 'customers')) { + if ($customers && property_exists($customers, 'customers')) { return $customers->customers[0]->id; }