1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 22:54:25 +01:00

Ensure account gateway fields array is initialized

This commit is contained in:
Hillel Coren 2017-03-21 11:32:02 +02:00
parent 6a5b189912
commit bc04d66371

View File

@ -132,6 +132,10 @@ class AccountGatewayController extends BaseController
$currentGateways = $account->account_gateways;
$gateways = Gateway::where('payment_library_id', '=', 1)->orderBy('name')->get();
if ($accountGateway) {
$accountGateway->fields = [];
}
foreach ($gateways as $gateway) {
$fields = $gateway->getFields();
if (! $gateway->isCustom()) {