Commit 0c000739 authored by Ad Schellevis's avatar Ad Schellevis

(mvc) bugfix afterExecuteRoute, on some occasions content could be delivered twice...

parent fe5eb31a
......@@ -206,13 +206,13 @@ class ApiControllerBase extends ControllerRoot
$data = $dispatcher->getReturnedValue();
if (is_array($data)) {
$this->response->setContentType('application/json', 'UTF-8');
echo htmlspecialchars(json_encode($data), ENT_NOQUOTES);
$this->response->setContent(htmlspecialchars(json_encode($data), ENT_NOQUOTES));
} else {
// output raw data
echo $data;
$this->response->setContent($data);
}
}
return true;
return $this->response->send();
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment