CRM-19257 - Fix PHP warning when browsing custom field multiple choice options
authorJon goldberg <jon@palantetech.coop>
Tue, 23 Aug 2016 20:39:39 +0000 (16:39 -0400)
committerJon goldberg <jon@palantetech.coop>
Tue, 23 Aug 2016 20:39:39 +0000 (16:39 -0400)
CRM/Core/BAO/CustomOption.php

index 12e708f219e945fa01fd2d994ded7682c8b62b30..6ddb378943221aa39e6ab7b1f78037b7b5f9c401 100644 (file)
@@ -144,7 +144,7 @@ class CRM_Core_BAO_CustomOption {
         $action -= CRM_Core_Action::DISABLE;
       }
       if (in_array($field->html_type, array('CheckBox', 'AdvMulti-Select', 'Multi-Select'))) {
-        if (in_array($dao->value, $defVal)) {
+        if (isset($defVal) && in_array($dao->value, $defVal)) {
           $options[$dao->id]['is_default'] = '<img src="' . $config->resourceBase . 'i/check.gif" />';
         }
         else {