From 03e2e2b13a30d306a6b826c4e5ed9416e2d48707 Mon Sep 17 00:00:00 2001 From: Edwin Noorlander Date: Wed, 12 Nov 2025 08:42:09 +0100 Subject: [PATCH] Add size limit to sidebar HTML to prevent large output causing 500 errors --- config.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config.php b/config.php index 8d97779..50a4543 100755 --- a/config.php +++ b/config.php @@ -105,6 +105,9 @@ try { } $sidebarHtml = ''; + if (strlen($sidebarHtml) > 50000) { // If too large, use menu + $sidebarHtml = ''; + } } catch (Exception $e) { error_log('Error building category tree: ' . $e->getMessage()); $sidebarHtml = '';