Skip to content

Commit

Permalink
BUG only call filemtime if file exists
Browse files Browse the repository at this point in the history
Added file_exists check before calling filemtime as this results in
'filemtime(): stat failed'
  • Loading branch information
Sander van Dragt authored and Sean Harvey committed Nov 21, 2012
1 parent df4fde3 commit 8f89aa9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion view/Requirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,9 @@ public function process_combined_files() {
// file exists, check modification date of every contained file
$srcLastMod = 0;
foreach($fileList as $file) {
$srcLastMod = max(filemtime($base . $file), $srcLastMod);
if(file_exists($base . $file)) {
$srcLastMod = max(filemtime($base . $file), $srcLastMod);
}
}
$refresh = $srcLastMod > filemtime($combinedFilePath);
} else {
Expand Down

0 comments on commit 8f89aa9

Please sign in to comment.