Merge pull request #9789 from fliespl/patch-2
[civicrm-core.git] / api / v3 / CustomValue.php
index 2deb17d7b15975b7a16cbaa80ed15e25eda01b67..27cf82c4c2e8bcef0c2a3063577f900533e0fe20 100644 (file)
@@ -3,7 +3,7 @@
  +--------------------------------------------------------------------+
  | CiviCRM version 4.7                                                |
  +--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2015                                |
+ | Copyright CiviCRM LLC (c) 2004-2017                                |
  +--------------------------------------------------------------------+
  | This file is a part of CiviCRM.                                    |
  |                                                                    |
@@ -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;