Skip to content
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

Warning unlink (/jacwright/restserver/source/Jacwright/RestServer/RestServer.php (274) #104

Open
Cleonet opened this issue Oct 26, 2017 · 2 comments

Comments

@Cleonet
Copy link

Cleonet commented Oct 26, 2017

I have to replace line 274 :
@unlink($this->cacheDir.'/urlMap.cache');

by

if (file_exists($this->cacheDir.'/urlMap.cache')) {
unlink($this->cacheDir.'/urlMap.cache');
}

Thank you

@tyzoid
Copy link
Collaborator

tyzoid commented Oct 26, 2017

Is the @ not squashing the warning? The problem is that this loses atomacy, which is important if handling requests in parallel, such as via apache2 or nginx.

@kevjett
Copy link

kevjett commented Sep 11, 2018

@ only squashes the error not the warning. I would suggest adding the if condition or you will have constant warning garbage in your logs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants