From 856793b1879594376a73e9f32101807344ebf7dd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 28 Dec 2022 02:47:37 +0100 Subject: [PATCH] Fix scrutinizer warnings --- htdocs/admin/security.php | 4 ++-- htdocs/variants/combinations.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index 33344363cf7..e30e50769bb 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -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); diff --git a/htdocs/variants/combinations.php b/htdocs/variants/combinations.php index 2d706699447..6949ccb183f 100644 --- a/htdocs/variants/combinations.php +++ b/htdocs/variants/combinations.php @@ -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;