suppress PHP errors/output before JSON in API handler
This commit is contained in:
1 parent
1b97c681e0
commit
61b19286ba
1 file changed
+2
@@ -86,6 +86,8 @@ function checkUpstream(string $host, int $port): bool {
|
||||
|
||||
// ─── API handlers ─────────────────────────────────────────────────────────────
|
||||
if (isset($_GET['action'])) {
|
||||
while (@ob_end_clean());
|
||||
ini_set('display_errors', 0);
|
||||
header('Content-Type: application/json');
|
||||
|
||||
switch ($_GET['action']) {
|
||||
|
||||
Reference in new issue
Block a user