Skip to content

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

Open

Description

@Cleonet

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

Activity

  1. tyzoid commented on Oct 26, 2017

    @tyzoid
    Collaborator

    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.

  2. kevjett commented on Sep 11, 2018

    @kevjett

    @ 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions