Merge pull request #28863 from mdeweerd/fix/testContactUpdate

Fix ContactTest::testContactUpdate
This commit is contained in:
Laurent Destailleur 2024-03-15 08:41:10 +01:00 committed by GitHub
commit 9929b06fbf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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;
}