From f5040c9b646f536fb356fd05fa206d49b1a67739 Mon Sep 17 00:00:00 2001 From: Fabian Schieder Date: Sat, 28 Feb 2026 01:25:23 +0100 Subject: [PATCH] Refactor logoExists function to resolve absolute file paths relative to index.php --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 9383a5c..17a64e8 100644 --- a/index.php +++ b/index.php @@ -60,7 +60,8 @@ $projects = [ * Verhindert Broken Images. */ function logoExists(string $webPath): bool { - $filePath = $_SERVER['DOCUMENT_ROOT'] . $webPath; + // Absoluten Dateisystempfad relativ zur index.php auflösen + $filePath = __DIR__ . '/' . ltrim($webPath, '/'); return is_file($filePath); }