diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index a12bb616949..d6c3387d89e 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -604,7 +604,7 @@ class Contact extends CommonObject $this->fax = trim($this->fax); $this->zip = (empty($this->zip) ? '' : trim($this->zip)); $this->town = (empty($this->town) ? '' : trim($this->town)); - $this->country_id = ($this->country_id > 0 ? 0 : $this->country_id); + $this->country_id = (empty($this->country_id) || $this->country_id < 0) ? 0 : $this->country_id; if (empty($this->statut)) { $this->statut = 0; }