From 20ad3b0e80c785ec5e894308ab4a2c079736ca8a Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 12 Jan 2018 10:39:15 +0100 Subject: [PATCH] Fix: if $entity is empty '' the isset return true !! --- htdocs/contact/class/contact.class.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index db2152a00ae..1bfc9ee8c19 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -176,9 +176,8 @@ class Contact extends CommonObject if (empty($this->socid)) $this->socid = 0; if (empty($this->priv)) $this->priv = 0; if (empty($this->statut)) $this->statut = 0; // This is to convert '' into '0' to avoid bad sql request - $entity = (isset($this->entity) && is_numeric($this->entity)?$this->entity:$conf->entity); - $entity = isset($this->entity)?$this->entity:$conf->entity; + $entity = (isset($this->entity) && is_numeric($this->entity)?$this->entity:$conf->entity); $sql = "INSERT INTO ".MAIN_DB_PREFIX."socpeople ("; $sql.= " datec";