MAPG-180 don't buffer content output to variable

This commit is contained in:
bence committed 2020-06-27 12:56:47 +02:00
1 parent efdd5c54be
commit a55ece7dac
4 files changed
+6 -13

No files matched your search

+2 -4
View File
@@ -7,13 +7,11 @@ class JsonContent extends ContentBase
$this->data = &$data;
}
public function &render(): string
public function render(): void
{
$this->data['__debug__runtime'] = round((hrtime(true) - SCRIPT_STARTED) / 1e+6, 1);
$content = json_encode($this->data);
return $content;
echo json_encode($this->data);
}
public function getContentType(): string