-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check if cached file exists #1866
Conversation
ref. #1848 cc @Tobion |
@fabpot I think I know why so many people report this: the Symfony Debug component is still logging silenced errors by default in the dev env |
@@ -87,6 +87,10 @@ public function write($key, $content) | |||
*/ | |||
public function getTimestamp($key) | |||
{ | |||
return (int) @filemtime($key); | |||
if (\file_exists($key)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The backslash is not necessary before a global function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should indeed be removed for 5.2 compat.
So, the fix should be done in Symfony instead, right? |
@fabpot no symfony cannot do anything about it. IMO this change here is valid (apart from the CS) as it avoids alot of warning spams. |
Thank you @torzech. |
Without this modification: