Merge pull request #16715 from frederic34/patch-12

fix php8 warning
This commit is contained in:
Laurent Destailleur 2021-03-16 10:31:09 +01:00 committed by GitHub
commit 8a23d515e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,7 +5,7 @@
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -33,7 +33,10 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
// Load translation files required by the page
$langs->loadLangs(array("banks", "categories", "multicurrency"));
$socid = 0;
if ($user->socid > 0) {
$socid = $user->socid;
}
if (!$user->rights->banque->transfer) {
accessforbidden();
}