diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index eedd82fc7e0..a6fa9fa987d 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -401,7 +401,7 @@ class Don extends CommonObject $sql .= ", '".$this->db->escape($this->address)."'"; $sql .= ", '".$this->db->escape($this->zip)."'"; $sql .= ", '".$this->db->escape($this->town)."'"; - $sql .= ", ".(int) $this->country_id; + $sql .= ", ".(int) ($this->country_id > 0 ? $this->country_id : 0); $sql .= ", ".(int) $this->public; $sql .= ", ".($this->fk_project > 0 ? (int) $this->fk_project : "null"); $sql .= ", ".(!empty($this->note_private) ? ("'".$this->db->escape($this->note_private)."'") : "NULL");