From 5b8c93b0909febc1783dfaf5368d4acd943e93a9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Jun 2021 18:01:31 +0200 Subject: [PATCH] FIX #17967 --- htdocs/contact/class/contact.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 7ca69871238..8644faef8a7 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -539,6 +539,7 @@ class Contact extends CommonObject $this->entity = ((isset($this->entity) && is_numeric($this->entity)) ? $this->entity : $conf->entity); // Clean parameters + $this->ref_ext = trim($this->ref_ext); $this->lastname = trim($this->lastname) ?trim($this->lastname) : trim($this->lastname); $this->firstname = trim($this->firstname); $this->email = trim($this->email); @@ -565,7 +566,8 @@ class Contact extends CommonObject } elseif ($this->socid == -1) { $sql .= " fk_soc=null,"; } - $sql .= " civility='".$this->db->escape($this->civility_code)."'"; + $sql .= " ref_ext='".$this->db->escape($this->ref_ext)."'"; + $sql .= ", civility='".$this->db->escape($this->civility_code)."'"; $sql .= ", lastname='".$this->db->escape($this->lastname)."'"; $sql .= ", firstname='".$this->db->escape($this->firstname)."'"; $sql .= ", address='".$this->db->escape($this->address)."'";