1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fix custom gateway check

This commit is contained in:
Hillel Coren 2017-04-13 10:31:55 +03:00
parent abaf8d97b9
commit 71155d1999

View File

@ -71,8 +71,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'));
}
}
}
}