Skip to content

Commit

Permalink
fix: check file exist before filemtime check
Browse files Browse the repository at this point in the history
  • Loading branch information
SonyPradana committed Nov 11, 2023
1 parent 7b78b21 commit aa2e85f
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/System/View/Manifestor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit aa2e85f

Please sign in to comment.