From 3700875c47c439c630bf15b0a69cb73c5c792e67 Mon Sep 17 00:00:00 2001 From: slawkens Date: Tue, 7 Feb 2023 10:13:04 +0100 Subject: [PATCH] fix warning in reload cache in dev mode --- system/functions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/system/functions.php b/system/functions.php index c2700076..136f4660 100644 --- a/system/functions.php +++ b/system/functions.php @@ -1166,8 +1166,11 @@ function clearCache() deleteDirectory(CACHE, ['signatures', 'twig', 'plugins', 'index.html'], true); // routes cache - unlink(CACHE . 'route.cache'); - + $routeCacheFile = CACHE . 'route.cache'; + if (file_exists($routeCacheFile)) { + unlink($routeCacheFile); + } + return true; }