projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0f9476b
)
getfields api - ensure 'name' property is set for every field
author
Coleman Watts
<coleman@civicrm.org>
Wed, 4 Feb 2015 02:42:47 +0000
(21:42 -0500)
committer
Coleman Watts
<coleman@civicrm.org>
Wed, 4 Feb 2015 02:42:47 +0000
(21:42 -0500)
api/v3/Generic.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/Generic.php
b/api/v3/Generic.php
index daf416e65c134ed99141a8f14a8fa84e2ef26d73..4dc53d259df4d052f2f43748cfaefb7cd075d257 100644
(file)
--- a/
api/v3/Generic.php
+++ b/
api/v3/Generic.php
@@
-142,6
+142,10
@@
function civicrm_api3_generic_getfields($apiRequest) {
$fieldsToResolve = (array) CRM_Utils_Array::value('get_options', $apiOptions, array());
foreach ($metadata as $fieldname => $fieldSpec) {
+ // Ensure 'name' is set
+ if (!isset($fieldSpec['name'])) {
+ $metadata[$fieldname]['name'] = $fieldname;
+ }
_civicrm_api3_generic_get_metadata_options($metadata, $apiRequest, $fieldname, $fieldSpec, $fieldsToResolve);
}