Fixes for PHP 5.4+
This commit is contained in:
@@ -62,6 +62,7 @@ function booking_report_summary() {
|
||||
$state_header = array('State', 'Count', 'Males', 'Females', 'Baptised', 'Male Average Age', 'Female Average Age', 'Overall Average Age');
|
||||
$state_rows = array();
|
||||
$state_statistics = array();
|
||||
//$state_statistics = new stdClass();
|
||||
|
||||
//do some analysis about the people booked in
|
||||
//first the summary of states
|
||||
@@ -84,6 +85,9 @@ function booking_report_summary() {
|
||||
if (strcmp($state->booking_country,'Australia') == 0 ) {
|
||||
//$state_rows[] = array($state->booking_state, $state->state_count);
|
||||
//store the total count for this state
|
||||
if (!isset($state_statistics[$state->booking_state])) {
|
||||
$state_statistics[$state->booking_state] = new stdClass();
|
||||
}
|
||||
$state_statistics[$state->booking_state]->total_count = $state->state_count;
|
||||
$state_statistics[$state->booking_state]->male_count = 0;
|
||||
$state_statistics[$state->booking_state]->male_avg = 0;
|
||||
@@ -97,6 +101,7 @@ function booking_report_summary() {
|
||||
}
|
||||
//non australian states
|
||||
//$state_rows[] = array('International', $non_australia_count);
|
||||
$state_statistics['International'] = new stdClass();
|
||||
$state_statistics['International']->total_count = $non_australia_count;
|
||||
$state_statistics['International']->male_count = 0;
|
||||
$state_statistics['International']->male_avg = 0;
|
||||
|
Reference in New Issue
Block a user