diff --git a/app/Http/Controllers/ClientPortalController.php b/app/Http/Controllers/ClientPortalController.php index ae82faca997e..fe5f666c3e58 100644 --- a/app/Http/Controllers/ClientPortalController.php +++ b/app/Http/Controllers/ClientPortalController.php @@ -164,7 +164,7 @@ class ClientPortalController extends BaseController $gatewayTypeIdCast = false; - if(array_key_exists('gatewayTypeId', $paymentTypes[0])) + if(count($paymentTypes) >= 1 && array_key_exists('gatewayTypeId', $paymentTypes[0])) $gatewayTypeIdCast = $paymentTypes[0]['gatewayTypeId']; $data += [