fix: Add output buffer cleansing in Response::json and enhance error logging for conversation parsing

This commit is contained in:
Hamza-Ayed
2026-08-27 14:54:11 +03:00
parent e16ad471c3
commit d18d1aa2b5
2 changed files with 22 additions and 6 deletions
+5 -1
View File
@@ -54,7 +54,11 @@ class Response
$this->sendHeaders();
http_response_code($this->statusCode);
echo json_encode($data, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
if (ob_get_length()) {
ob_clean();
}
echo json_encode($data, JSON_UNESCAPED_UNICODE);
exit;
}