Commit 7e7dd95f authored by jaapjansma's avatar jaapjansma

Fixed issue with option value action

parent bb84ebba
......@@ -73,11 +73,12 @@ class OptionValueToLabel extends AbstractAction {
if (is_array($value)) {
$labels = array();
foreach($value as $v) {
$labels[] = civicrm_api3('OptionValue', 'getvalue', array('return' => 'label', 'value' => $v, 'option_group_id' => $option_group_id));
$label = civicrm_api3('OptionValue', 'getvalue', array('return' => 'label', 'value' => $v, 'option_group_id' => $option_group_id));
$labels[] = $label;
}
$output->setParameter('value', $labels);
} else {
$label = civicrm_api3('OptionValue', 'getvalue', array('return' => 'label', 'value' => $v, 'option_group_id' => $option_group_id));
$label = civicrm_api3('OptionValue', 'getvalue', array('return' => 'label', 'value' => $value, 'option_group_id' => $option_group_id));
$output->setParameter('value', $label);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment