From aa2e85f344ffa67df964ea89921c6b3fdaf845e0 Mon Sep 17 00:00:00 2001 From: SonyPradana Date: Sat, 11 Nov 2023 19:52:44 +0700 Subject: [PATCH] fix: check file exist before filemtime check --- src/System/View/Manifestor.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/System/View/Manifestor.php b/src/System/View/Manifestor.php index 2b4eac23..1d6f58b5 100644 --- a/src/System/View/Manifestor.php +++ b/src/System/View/Manifestor.php @@ -147,14 +147,11 @@ public function isDependencyUptodate(string $template_filename, int $template_ti } foreach ($this->getDependency($template_filename) as $file) { - $check = $this->templateDir . '/' . $file; - $file_time = \filemtime($check); - - if (false === file_exists($check)) { + if (false === file_exists($check = $this->templateDir . '/' . $file)) { return false; } - if ($file_time >= $template_time) { + if (\filemtime($check) >= $template_time) { return false; } }