mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Check for valid bank account property before attempting to iterate
This commit is contained in:
parent
68ff176725
commit
5f3d48e189
@ -74,6 +74,9 @@ class UpdatePaymentMethods
|
|||||||
{
|
{
|
||||||
$sources = $customer->sources;
|
$sources = $customer->sources;
|
||||||
|
|
||||||
|
if(!property_exists($sources, 'data'))
|
||||||
|
return;
|
||||||
|
|
||||||
foreach ($sources->data as $method) {
|
foreach ($sources->data as $method) {
|
||||||
$token_exists = ClientGatewayToken::where([
|
$token_exists = ClientGatewayToken::where([
|
||||||
'gateway_customer_reference' => $customer->id,
|
'gateway_customer_reference' => $customer->id,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user