From 3a86863d424479f88ebc71e0b1cc67a4afb49dbd Mon Sep 17 00:00:00 2001 From: Lars Gebhardt-Kusche Date: Sat, 27 Dec 2025 02:56:19 +0100 Subject: [PATCH] adsasd --- partials/structure/layout_start.php | 9 ++++++++- public/page/debug.php | 6 ++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/partials/structure/layout_start.php b/partials/structure/layout_start.php index 3f7611d..86e6274 100644 --- a/partials/structure/layout_start.php +++ b/partials/structure/layout_start.php @@ -89,8 +89,15 @@ if ($debugEnabled) { const file = select.value; if (!file) { content.innerHTML = '

Log auswählen, um Inhalt zu sehen.

'; return; } fetch('/debug?file=' + encodeURIComponent(file) + '&raw=1') - .then(r => r.text()) + .then(r => { + if (!r.ok) throw new Error('Request failed'); + return r.text(); + }) .then(text => { + if (!text.trim()) { + content.innerHTML = '

Log ist leer.

'; + return; + } const escape = (s) => s .replace(/&/g, '&') .replace(/