Merge branch '4.4' of https://github.com/civicrm/civicrm-core
[civicrm-core.git] / CRM / Report / Form / Event / IncomeCountSummary.php
index 81e06c6e1747a0679804be059ace0ba39023c817..6dd84ce2e9af7bbb514bb493b1d67dc50da45107 100644 (file)
@@ -152,10 +152,8 @@ class CRM_Report_Form_Event_IncomeCountSummary extends CRM_Report_Form_Event {
     foreach ($this->_columns as $tableName => $table) {
       if (array_key_exists('fields', $table)) {
         foreach ($table['fields'] as $fieldName => $field) {
-          if (CRM_Utils_Array::value('required', $field) ||
-            CRM_Utils_Array::value($fieldName, $this->_params['fields'])
-          ) {
-            if (CRM_Utils_Array::value('statistics', $field)) {
+          if (!empty($field['required']) || !empty($this->_params['fields'][$fieldName])) {
+            if (!empty($field['statistics'])) {
               foreach ($field['statistics'] as $stat => $label) {
                 switch (strtolower($stat)) {
                   case 'count':
@@ -339,7 +337,7 @@ class CRM_Report_Form_Event_IncomeCountSummary extends CRM_Report_Form_Event {
 
     $this->_interval = 'events';
     $countEvent = NULL;
-    if (CRM_Utils_Array::value('charts', $this->_params)) {
+    if (!empty($this->_params['charts'])) {
       foreach ($rows as $key => $value) {
         if ($value['civicrm_event_id']) {
           $graphRows['totalParticipants'][] = ($rows[$key]['civicrm_line_item_participant_count_count']);