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:
5498def
)
Explode return values if it is not already an array.
author
Thomas
<tschuettler@oxfam.de>
Tue, 31 Jul 2018 14:13:01 +0000
(16:13 +0200)
committer
Thomas
<tschuettler@oxfam.de>
Tue, 31 Jul 2018 14:13:01 +0000
(16:13 +0200)
api/v3/CustomValue.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/CustomValue.php
b/api/v3/CustomValue.php
index e53b39d88a7013c0676cd738c8d50b730ed3012d..3a855d21f3106ac1e27d6bbc8f12269efc096db7 100644
(file)
--- a/
api/v3/CustomValue.php
+++ b/
api/v3/CustomValue.php
@@
-149,7
+149,10
@@
function civicrm_api3_custom_value_get($params) {
if (!empty(substr($id, 7))) {
$returnVal = substr($id, 7);
}
- foreach ((array) $returnVal as $value) {
+ if (!is_array($returnVal)) {
+ $returnVal = explode(',', $returnVal);
+ }
+ foreach ($returnVal as $value) {
list($c, $i) = CRM_Utils_System::explode('_', $value, 2);
if ($c == 'custom' && is_numeric($i)) {
$names['custom_' . $i] = 'custom_' . $i;