Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/Symfony/Component/Config/Resource/DirectoryResource.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,15 @@ public function isFresh($timestamp)
continue;
}

// for broken links
try {
$fileMTime = $file->getMTime();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does getMTime() from PHP throws a RuntimeException? If yes, since which version?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All PHP versions since 5.3.

symlink('/tmp/target_not_exists', '/tmp/link');
$file = new SplFileInfo('/tmp/link');
var_dump($file->getMTime());

https://3v4l.org/nLNYH

} catch (\RuntimeException $e) {
continue;
}

// early return if a file's mtime exceeds the passed timestamp
if ($timestamp < $file->getMTime()) {
if ($timestamp < $fileMTime) {
return false;
}
}
Expand Down