fixed empty data bug in json view
This commit is contained in:
parent
0c162cfede
commit
64e374a9b1
1 changed files with 1 additions and 1 deletions
|
@ -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']);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue