if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
if (isset($field['default'])) {
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE
) {
if (is_array($field['default'])) {
$this->_defaults["{$fieldName}_from"] = $field['default']['from'] ?? NULL;
* Relevant where clause.
*/
protected function generateFilterClause($field, $fieldName) {
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
if (($field['operatorType'] ?? NULL) ==
CRM_Report_Form::OP_MONTH
) {
) {
continue;
}
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('operatorType', $field) & CRM_Report_Form::OP_DATE
+ if (($field['operatorType'] ?? 0) & CRM_Report_Form::OP_DATE
) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('operatorType', $field) & CRM_Report_Form::OP_DATE
+ if (($field['operatorType'] ?? 0) & CRM_Report_Form::OP_DATE
) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('operatorType', $field) & CRM_Report_Form::OP_DATE
+ if (($field['operatorType'] ?? 0) & CRM_Report_Form::OP_DATE
) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
$arraykey = $dao->civicrm_financial_account_id . '_' . $dao->civicrm_financial_account_1_id;
if (property_exists($dao, $key)) {
- if (CRM_Utils_Array::value('type', $value) & CRM_Utils_Type::T_DATE) {
+ if (($value['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$row[$key] = CRM_Utils_Date::customFormat($dao->$key, $dateFormat);
}
- elseif (CRM_Utils_Array::value('type', $value) & CRM_Utils_Type::T_MONEY) {
+ elseif (($value['type'] ?? 0) & CRM_Utils_Type::T_MONEY) {
$values = [];
foreach (explode(',', $dao->$key) as $moneyValue) {
$values[] = CRM_Utils_Money::format($moneyValue);
if ($fieldName == 'this_year' || $fieldName == 'other_year') {
continue;
}
- elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE
+ elseif (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE
) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
foreach ($this->_columns['civicrm_contribution']['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
self::fiscalYearOffset('contri.receive_date') .
" = {$this->_params['yid_value']} AND contri.is_test = 0 AND contri.is_template = 0 )";
}
- elseif (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE
+ elseif (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE
) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
if (array_key_exists('filters', $table)) {
foreach ($table['filters'] as $fieldName => $field) {
$clause = NULL;
- if (CRM_Utils_Array::value('type', $field) & CRM_Utils_Type::T_DATE) {
+ if (($field['type'] ?? 0) & CRM_Utils_Type::T_DATE) {
$relative = $this->_params["{$fieldName}_relative"] ?? NULL;
$from = $this->_params["{$fieldName}_from"] ?? NULL;
$to = $this->_params["{$fieldName}_to"] ?? NULL;
// Remove HTML, unencode entities, and escape quotation marks.
$value = str_replace('"', '""', html_entity_decode(strip_tags($value), ENT_QUOTES | ENT_HTML401));
- if (CRM_Utils_Array::value('type', $form->_columnHeaders[$v]) & 4) {
+ if (($form->_columnHeaders[$v]['type'] ?? 0) & 4) {
if (($form->_columnHeaders[$v]['group_by'] ?? NULL) == 'MONTH' ||
($form->_columnHeaders[$v]['group_by'] ?? NULL) == 'QUARTER'
) {