diff --git a/app/PaymentDrivers/Stripe/ImportCustomers.php b/app/PaymentDrivers/Stripe/ImportCustomers.php index 5ca8ef65fbeb..90d1eb83842f 100644 --- a/app/PaymentDrivers/Stripe/ImportCustomers.php +++ b/app/PaymentDrivers/Stripe/ImportCustomers.php @@ -72,8 +72,10 @@ class ImportCustomers // else // break; - $starting_after = end($customers->data)['id']; + $starting_after = isset(end($customers->data)['id']) ? end($customers->data)['id'] : false; + if(!$starting_after) + break; } while ($customers->has_more); }