diff --git a/app/PaymentDrivers/Stripe/ImportCustomers.php b/app/PaymentDrivers/Stripe/ImportCustomers.php index 3661091b4956..377d2d53d386 100644 --- a/app/PaymentDrivers/Stripe/ImportCustomers.php +++ b/app/PaymentDrivers/Stripe/ImportCustomers.php @@ -63,7 +63,11 @@ class ImportCustomers $this->addCustomer($customer); } - $starting_after = end($customers->data)['id']; + //handle + if(is_array($customers->data) && end($customers->data) && array_key_exists('id', end($customers->data))) + $starting_after = end($customers->data)['id']; + else + break; } while ($customers->has_more); }