From 4d80dc9d69bd3baa4ff4e9ceea5a602d774464e1 Mon Sep 17 00:00:00 2001 From: ldestailleur Date: Sat, 12 Apr 2025 16:18:40 +0200 Subject: [PATCH] Debug v22 --- htdocs/core/class/commonobject.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index cd4973c07ac..9efa79bcf33 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1256,7 +1256,7 @@ abstract class CommonObject return -2; } - if ($this->restrictiononfksoc && property_exists('socid', $this) && !empty($this->socid) && !$user->hasRight('societe', 'client', 'voir')) { + if ($this->restrictiononfksoc && property_exists($this, 'socid') && !empty($this->socid) && !$user->hasRight('societe', 'client', 'voir')) { $sql_allowed_contacts = 'SELECT COUNT(*) as cnt FROM '.$this->db->prefix().'societe_commerciaux as sc'; $sql_allowed_contacts.= ' WHERE sc.fk_soc = '.(int) $this->socid; $sql_allowed_contacts.= ' AND sc.fk_user = '.(int) $user->id;