Fix headers already send error

This commit is contained in:
Matteo Gheza 2021-03-04 22:30:40 +01:00
parent 88c02a8f0f
commit 88c4f3c5e2
1 changed files with 1 additions and 1 deletions

View File

@ -170,12 +170,12 @@ class tools
$response_data = substr(crc32($json_response), 0, 10);
header("data: ".$response_data);
header("Content-type: application/json");
if(!is_null($debugbar)) $debugbar->sendDataInHeaders();
if(isset($_GET["old_data"]) && $_GET["old_data"] !== $response_data){
print($json_response);
} else {
print("{}");
}
if(!is_null($debugbar)) $debugbar->sendDataInHeaders();
}
}