From c35c15e782a6cea89bd0eb59e8653388083c7c7c Mon Sep 17 00:00:00 2001 From: Gauthier PC portable 024 Date: Fri, 9 Apr 2021 11:31:50 +0200 Subject: [PATCH] FIX : test must be === and not == --- htdocs/core/class/html.form.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 20541ddc975..1213c070acc 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6160,7 +6160,7 @@ class Form $tmparray = explode('@', $objecttmp->ismultientitymanaged); $sql .= ' INNER JOIN '.MAIN_DB_PREFIX.$tmparray[1].' as parenttable ON parenttable.rowid = t.'.$tmparray[0]; } - if ($objecttmp->ismultientitymanaged == 'fk_soc@societe') + if ($objecttmp->ismultientitymanaged === 'fk_soc@societe') if (!$user->rights->societe->client->voir && !$user->socid) $sql .= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql .= " WHERE 1=1"; if (isset($objecttmp->ismultientitymanaged) && $objecttmp->ismultientitymanaged == 1) $sql .= " AND t.entity IN (".getEntity($objecttmp->table_element).")"; @@ -6172,7 +6172,7 @@ class Form else $sql .= " AND t.fk_soc = ".$user->socid; } if ($searchkey != '') $sql .= natural_search(explode(',', $fieldstoshow), $searchkey); - if ($objecttmp->ismultientitymanaged == 'fk_soc@societe') { + if ($objecttmp->ismultientitymanaged === 'fk_soc@societe') { if (!$user->rights->societe->client->voir && !$user->socid) $sql .= " AND t.rowid = sc.fk_soc AND sc.fk_user = ".$user->id; } if ($objecttmp->filter) { // Syntax example "(t.ref:like:'SO-%') and (t.date_creation:<:'20160101')"