RestServer
RestServer copied to clipboard
Warning unlink (/jacwright/restserver/source/Jacwright/RestServer/RestServer.php (274)
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
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.
@ only squashes the error not the warning. I would suggest adding the if condition or you will have constant warning garbage in your logs.