fixed small bug (undefined index if we have no data)
This commit is contained in:
parent
afeb2a978d
commit
171ff79a85
1 changed files with 3 additions and 1 deletions
|
@ -147,9 +147,11 @@ class JSON extends View {
|
|||
protected function addData(Interpreter\InterpreterInterface $interpreter) {
|
||||
$data = $interpreter->getValues($this->request->getParameter('tuples'), $this->request->getParameter('group'));
|
||||
|
||||
$this->json['data'][] = array(
|
||||
$this->json['data'] = array(
|
||||
'uuid' => $interpreter->getUuid(),
|
||||
'count' => count($data),
|
||||
'first' => (isset($data[0][0])) ? $data[0][0] : NULL,
|
||||
'last' => (isset($data[count($data)-1][0])) ? $data[count($data)-1][0] : NULL,
|
||||
'min' => $interpreter->getMin(),
|
||||
'max' => $interpreter->getMax(),
|
||||
'average' => $interpreter->getAverage(),
|
||||
|
|
Loading…
Add table
Reference in a new issue