Fixes perso marketing (all marketing were Xorg marketing).
[platal.git] / modules / profile / addresses.inc.php
index 8f7614d..4e6d51b 100644 (file)
@@ -53,7 +53,7 @@ class ProfileSettingAddress extends ProfileSettingGeocoding
         }
         foreach ($value as $key => &$address) {
             if (isset($address['removed']) && $address['removed']) {
-                unset($value[$key]);
+                array_splice($value, $key, 1);
             }
         }
         $current = 0;
@@ -64,7 +64,7 @@ class ProfileSettingAddress extends ProfileSettingGeocoding
             }
         }
         if ($current == 0 && count($value) > 0) {
-            foreach ($value as $address) {
+            foreach ($value as &$address) {
                 $address['current'] = true;
                 break;
             }