Adds the entity_table to the correct element in the result array.
authorMattias Michaux <mattias.michaux@gmail.com>
Fri, 30 Oct 2015 16:10:33 +0000 (17:10 +0100)
committerMattias Michaux <mattias.michaux@gmail.com>
Fri, 30 Oct 2015 16:10:33 +0000 (17:10 +0100)
api/v3/CustomValue.php

index 2deb17d7b15975b7a16cbaa80ed15e25eda01b67..6c7565234f820db7a5b9a0a5ebad90d2218b217a 100644 (file)
@@ -210,7 +210,7 @@ function civicrm_api3_custom_value_get($params) {
       }
       $values[$id]['entity_id'] = $getParams['entityID'];
       if (!empty($getParams['entityType'])) {
-        $values[$n]['entity_table'] = $getParams['entityType'];
+        $values[$id]['entity_table'] = $getParams['entityType'];
       }
       //set 'latest' -useful for multi fields but set for single for consistency
       $values[$id]['latest'] = $value;