Merge pull request #2391 from colemanw/arrayEmpty
[civicrm-core.git] / CRM / Report / Form / Contact / Log.php
index b714015e1261cac24ad9702e261d7690e75c9dcc..858829f66e5cea563e4e409c44d289a161f1edf0 100644 (file)
@@ -158,9 +158,7 @@ class CRM_Report_Form_Contact_Log extends CRM_Report_Form {
     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 (!empty($field['required']) || !empty($this->_params['fields'][$fieldName])) {
 
             $select[] = "{$field['dbAlias']} as {$tableName}_{$fieldName}";
             $this->_columnHeaders["{$tableName}_{$fieldName}"]['type'] = CRM_Utils_Array::value('type', $field);