minor fix for custom Select Field
authormonishdeb <monish.deb@webaccessglobal.com>
Mon, 27 Jul 2015 15:58:04 +0000 (21:28 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Mon, 27 Jul 2015 15:58:04 +0000 (21:28 +0530)
CRM/Core/BAO/CustomField.php

index ac4e7c9231139efa38acb6157a9a61a8f47e5e25..e76a8a2dd5700913195e2ea47aa679fdc8027358 100644 (file)
@@ -1209,7 +1209,15 @@ class CRM_Core_BAO_CustomField extends CRM_Core_DAO_CustomField {
         break;
 
       case 'Select':
-        $display = CRM_Utils_Array::value($value, $option);
+        if (is_array($value)) {
+          $display = NULL;
+          foreach ($value as $data) {
+            $display .= $display ? ', ' . $option[$data] : $option[$data];
+          }
+        }
+        else {
+          $display = CRM_Utils_Array::value($value, $option);
+        }
         break;
 
       case 'CheckBox':