From 61b19286ba45c53ffa2290652a06f00a13c1e1ad Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 6 Apr 2026 22:54:27 +0200 Subject: [PATCH] suppress PHP errors/output before JSON in API handler --- app/index.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/index.php b/app/index.php index 9ba2fc7..f398008 100644 --- a/app/index.php +++ b/app/index.php @@ -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']) {