Skip to content

Commit

Permalink
Use numbers in stats
Browse files Browse the repository at this point in the history
  • Loading branch information
fabian committed May 21, 2016
1 parent 94a66b0 commit 728fe59
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions web/stats.php
Expand Up @@ -37,11 +37,11 @@
// combine calls and errors
$data = array();
foreach ($calls as $date => $value) {
$data[$date] = array('date' => $date, 'calls' => ($value ?: 0), 'errors' => 0);
$data[$date] = array('date' => $date, 'calls' => ((int) $value ?: 0), 'errors' => 0);
}
foreach ($errors as $date => $value) {
if (isset($data[$date])) {
$data[$date]['errors'] = ($value ?: 0);
$data[$date]['errors'] = ((int) $value ?: 0);
}
}
$data = array_values($data);
Expand Down

0 comments on commit 728fe59

Please sign in to comment.