fixed empty data bug in json view

This commit is contained in:
Steffen Vogel 2010-06-09 21:11:58 +02:00
parent 0c162cfede
commit 64e374a9b1

View file

@ -63,7 +63,7 @@ class JsonView extends View {
// TODO check for optional data in second param
if (!is_null($data) && is_array($data)) {
$channel['data'][] = array();
$channel['data'] = array();
foreach ($data as $reading) {
$channel['data'][] = array($reading['timestamp'], $reading['value'], $reading['count']);
}