diff --git a/calendar/inc/class.calendar_category_report.inc.php b/calendar/inc/class.calendar_category_report.inc.php index fe2dcd6f3b..36d26226bd 100644 --- a/calendar/inc/class.calendar_category_report.inc.php +++ b/calendar/inc/class.calendar_category_report.inc.php @@ -418,13 +418,8 @@ class calendar_category_report extends calendar_ui{ foreach ($raw_csv as &$row) { - $check_row = 0; - foreach ($row as $val) - { - $check_row += $val; - } //check if all values of the row is zero then escape the row - if (!$check_row) continue; + if (!array_sum($row)) continue; // printout each row into file fputcsv($fp, array_values($row));