Address countryId field should be null if no country was found.
authorStéphane Jacob <sj@m4x.org>
Thu, 30 Sep 2010 17:05:21 +0000 (19:05 +0200)
committerStéphane Jacob <sj@m4x.org>
Thu, 30 Sep 2010 17:05:40 +0000 (19:05 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
classes/address.php

index 36eac5b..0eac92c 100644 (file)
@@ -166,6 +166,9 @@ class Address
                 $mailer->send();
             }
         }
+        if ($this->countryId == '') {
+            $this->countryId = null;
+        }
         $this->geocodeChosen = null;
         $this->phones = Phone::formatFormArray($this->phones, $this->error);
         return !$this->error;