BUG only call filemtime if file exists

Added file_exists check before calling filemtime as this results in
'filemtime(): stat failed'
This commit is contained in:
Sander van Dragt 2012-11-20 09:22:51 +00:00 committed by Sean Harvey
parent df4fde3864
commit 8f89aa9171

View File

@ -1023,7 +1023,9 @@ class Requirements_Backend {
// 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 {