From ce22997dfbe4a8f2a6efa6f77d5b0bfc7b2dabd1 Mon Sep 17 00:00:00 2001 From: Inverle Date: Sat, 5 Jul 2025 23:46:54 +0200 Subject: [PATCH] Fix custom icons not displaying (#7717) * Fix custom icons not displaying * Refactor --- p/f.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/p/f.php b/p/f.php index 71859d6d1..98e50389b 100644 --- a/p/f.php +++ b/p/f.php @@ -25,7 +25,9 @@ $ico = FAVICONS_DIR . $id . '.ico'; $ico_mtime = @filemtime($ico) ?: 0; $txt_mtime = @filemtime($txt) ?: 0; -if ($ico_mtime == false || $ico_mtime < $txt_mtime || ($ico_mtime < time() - (mt_rand(15, 20) * 86400))) { +$is_custom_favicon = $ico_mtime != false && $txt_mtime == false; + +if (($ico_mtime == false || $ico_mtime < $txt_mtime || ($ico_mtime < time() - (mt_rand(15, 20) * 86400))) && !$is_custom_favicon) { if ($txt_mtime == false) { show_default_favicon(1800); exit();