CRM-14106 - Regex targeting the first part of if statements
[civicrm-core.git] / CRM / Contact / Form / Search / Custom / MultipleValues.php
index f9f8df46c8a6c8275df816c14ed8ab65c813abc3..5458e0f9bd5874fb698f43185e8791266d1d33e9 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /*
  +--------------------------------------------------------------------+
- | CiviCRM version 4.3                                                |
+ | CiviCRM version 4.4                                                |
  +--------------------------------------------------------------------+
  | Copyright CiviCRM LLC (c) 2004-2013                                |
  +--------------------------------------------------------------------+
@@ -67,7 +67,7 @@ class CRM_Contact_Form_Search_Custom_MultipleValues extends CRM_Contact_Form_Sea
     // add all the fields for chosen groups
     $this->_tables = $this->_options = array();
     foreach ($this->_groupTree as $groupID => $group) {
-      if (!CRM_Utils_Array::value($groupID, $this->_customGroupIDs)) {
+      if (empty($this->_customGroupIDs[$groupID])) {
         continue;
       }
 
@@ -131,7 +131,7 @@ class CRM_Contact_Form_Search_Custom_MultipleValues extends CRM_Contact_Form_Sea
 
   function all($offset = 0, $rowcount = 0, $sort = NULL, $includeContactIDs = FALSE, $justIDs = FALSE) {
     //redirect if custom group not select in search criteria
-    if (!CRM_Utils_Array::value('custom_group', $this->_formValues)) {
+    if (empty($this->_formValues['custom_group'])) {
       CRM_Core_Error::statusBounce(ts("You must select at least one Custom Group as a search criteria."),
         CRM_Utils_System::url('civicrm/contact/search/custom',
           "reset=1&csid={$this->_formValues['customSearchID']}",