X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContact%2FSelector.php;h=0986377581838dd60cb99d8699ce4cd043afba6f;hb=5ee21cd148b08ebeae234800b67718b73bd06530;hp=f2fd42a7e20f61fa81663ce1136e5d66e13122ab;hpb=7a07be0ded879e23af48b652d890b5dd88a8b421;p=civicrm-core.git diff --git a/CRM/Contact/Selector.php b/CRM/Contact/Selector.php index f2fd42a7e2..0986377581 100644 --- a/CRM/Contact/Selector.php +++ b/CRM/Contact/Selector.php @@ -61,6 +61,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se 'status', 'do_not_email', 'do_not_phone', + 'do_not_sms', 'do_not_mail', ]; @@ -805,9 +806,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se ); } elseif ((is_numeric(CRM_Utils_Array::value('geo_code_1', $row))) || - (!empty($row['city']) && - CRM_Utils_Array::value('state_province', $row) - ) + (!empty($row['city']) && !empty($row['state_province'])) ) { $row['action'] = CRM_Core_Action::formLink( $links, @@ -935,9 +934,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se } if ((!is_numeric(CRM_Utils_Array::value('geo_code_1', $row))) && - (empty($row['city']) || - !CRM_Utils_Array::value('state_province', $row) - ) + (empty($row['city']) || empty($row['state_province'])) ) { $mask = $mask & 4095; } @@ -1021,6 +1018,8 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se */ public function fillupPrevNextCache($sort, $cacheKey, $start = 0, $end = self::CACHE_SIZE) { $coreSearch = TRUE; + // This ensures exceptions are caught in the try-catch. + $handling = CRM_Core_TemporaryErrorScope::useException(); // For custom searches, use the contactIDs method if (is_a($this, 'CRM_Contact_Selector_Custom')) { $sql = $this->_search->contactIDs($start, $end, $sort, TRUE); @@ -1049,7 +1048,7 @@ class CRM_Contact_Selector extends CRM_Core_Selector_Base implements CRM_Core_Se try { Civi::service('prevnext')->fillWithSql($cacheKey, $sql); } - catch (CRM_Core_Exception $e) { + catch (\Exception $e) { if ($coreSearch) { // in the case of error, try rebuilding cache using full sql which is used for search selector display // this fixes the bugs reported in CRM-13996 & CRM-14438