Fixes unset viriables warnings.
authorStéphane Jacob <sj@m4x.org>
Mon, 29 Nov 2010 15:32:18 +0000 (16:32 +0100)
committerStéphane Jacob <sj@m4x.org>
Wed, 1 Dec 2010 12:37:47 +0000 (13:37 +0100)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
classes/address.php

index 81a5213..cbdc34e 100644 (file)
@@ -191,6 +191,10 @@ class Address
             $format['requireGeocoding'] = false;
             $format['stripGeocoding'] = false;
             $format['postalText'] = false;
+        } else {
+            foreach (array('requireGeocoding', 'stripGeocoding', 'postalText') as $type) {
+                $format[$type] = (isset($format[$type])) ? $format[$type] : false;
+            }
         }
         $this->text = trim($this->text);
         if ($this->removed == 1) {