1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-14 07:02:34 +01:00

Fix custom gateway check

This commit is contained in:
Hillel Coren 2017-04-13 10:32:09 +03:00
parent 8ac3cd731e
commit 42728b4ea1

View File

@ -69,8 +69,11 @@ class HandleUserLoggedIn
}
// check custom gateway id is correct
if (! Utils::isNinja() && Gateway::find(GATEWAY_CUSTOM)->name !== 'Custom') {
Session::flash('error', trans('texts.error_incorrect_gateway_ids'));
if (! Utils::isNinja()) {
$gateway = Gateway::find(GATEWAY_CUSTOM);
if (! $gateway || $gateway->name !== 'Custom') {
Session::flash('error', trans('texts.error_incorrect_gateway_ids'));
}
}
}
}