Do not save latitudes and longitudes for empty addresses.
authorStéphane Jacob <sj@m4x.org>
Fri, 10 Jun 2011 14:55:49 +0000 (16:55 +0200)
committerStéphane Jacob <sj@m4x.org>
Fri, 10 Jun 2011 14:55:49 +0000 (16:55 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
classes/address.php

index 870652e..a532c8d 100644 (file)
@@ -596,6 +596,10 @@ class Address
             }
             $this->componentsIds = implode(',', $componants);
         }
+        if ($this->componentsIds == '') {
+            $this->latitude = null;
+            $this->longitude = null;
+        }
 
         return true;
     }