Fix scrutinizer warnings

This commit is contained in:
Laurent Destailleur 2022-12-28 02:47:37 +01:00
parent 914f6108d5
commit 856793b187
2 changed files with 3 additions and 3 deletions

View File

@ -56,8 +56,8 @@ if ($action == 'activate_encrypt') {
$db->begin();
// On old version a bug created the constant into user entity, so we delete it to be sure, such entry won't exists. We want it in entity 0 or nowhere.
dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $conf->entity);
// On old version, a bug created the constant into user entity, so we delete it to be sure such entry won't exists. We want it in entity 0 or nowhere.
dolibarr_del_const($db, "DATABASE_PWD_ENCRYPTED", $conf->entity);
// We set entity=0 (all) because DATABASE_PWD_ENCRYPTED is a setup into conf file, so always shared for everybody
$entityforall = 0;
dolibarr_set_const($db, "DATABASE_PWD_ENCRYPTED", "1", 'chaine', 0, '', $entityforall);

View File

@ -496,7 +496,7 @@ if (!empty($id) || !empty($ref)) {
}
if ($action == 'add') {
$prodattr_all = $prodattr->fetchAll(1);
$prodattr_all = $prodattr->fetchAll();
if (!$selected) {
$selected = $prodattr_all[key($prodattr_all)]->id;