Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 3.3.5
-
Fix Version/s: Unscheduled
-
Component/s: CiviCRM API
-
Labels:None
Description
An array request to civicrm_location_update like
Array
(
[email] => Array
(
[0] => Array
(
[id] => 15
[location_type_id] => 1
[email] => john@doe.com
[is_primary] => 1
[on_hold] => 0
)
)
[phone] => Array
(
[0] => Array
(
[id] => 3
[location_type_id] => 1
[phone] => 123456
[is_primary] => 1
)
)
[address] => Array
(
[0] => Array
(
[id] => 11
[location_type_id] => 1
[street_address] => balbla
[supplemental_address_1] => C/O addr
[city] => Stockholm
[postal_code] => 12345
[country_id] => 1204
[is_primary] => 1
)
)
[contact_id] => 13
[version] => 3.0
results in an updated email and phone, while the address is not changed:
Array
(
[is_error] => 0
[result] => Array
(
[phone] => Array
(
[0] => 3
)
[email] => Array
(
[0] => 15
)
)
)
changing the index of the address array from 0 to 1 makes the function working as expected:
[...]
[address] => Array
(
[1] => Array
(
[id] => 11
[location_type_id] => 1
[...]
see also http://forum.civicrm.org/index.php/topic,15352.msg65801.html#msg65801