Merge pull request #48 from zmilonas/patch-1

Adding a proper Content-Type to err()
This commit is contained in:
John Campbell
2019-10-24 10:05:20 -06:00
committed by GitHub

View File

@@ -176,6 +176,7 @@ function get_absolute_path($path) {
function err($code,$msg) {
http_response_code($code);
header("Content-Type: application/json");
echo json_encode(['error' => ['code'=>intval($code), 'msg' => $msg]]);
exit;
}