send the http response code for errors

This commit is contained in:
John Campbell
2017-02-22 13:44:02 -05:00
parent d5b8997be7
commit 81c7d21d1f
+1
View File
@@ -153,6 +153,7 @@ function get_absolute_path($path) {
}
function err($code,$msg) {
http_response_code($code);
echo json_encode(['error' => ['code'=>intval($code), 'msg' => $msg]]);
exit;
}