CRM-17646 - Fix array merge
authorColeman Watts <coleman@civicrm.org>
Wed, 16 Dec 2015 19:31:34 +0000 (14:31 -0500)
committerColeman Watts <coleman@civicrm.org>
Mon, 21 Dec 2015 15:55:28 +0000 (10:55 -0500)
CRM/Core/BAO/CustomQuery.php

index b65b1ce52791d3f1a47c44eba39bfa14ac414ce5..24d7f0491b79d9e9268e8dadec50f211da00a0a1 100644 (file)
@@ -205,7 +205,12 @@ SELECT f.id, f.label, f.data_type,
           'data_type' => $dao->data_type,
           'html_type' => $dao->html_type,
         ),
-      ) + CRM_Core_PseudoConstant::get('CRM_Core_BAO_CustomField', 'custom_' . $dao->id, array(), 'search');
+      );
+
+      $options = CRM_Core_PseudoConstant::get('CRM_Core_BAO_CustomField', 'custom_' . $dao->id, array(), 'search');
+      if ($options) {
+        $this->_options[$dao->id] += $options;
+      }
 
       if ($dao->html_type == 'Select Date') {
         $this->_options[$dao->id]['attributes']['date_format'] = $dao->date_format;