Skip to content

Commit

Permalink
Fixed an issue with the variable missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Fenn committed Feb 11, 2015
1 parent d57571b commit ccde89c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/PidHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,15 +84,16 @@ public function unlock()
{
$this->checkDirExists();

if (!file_exists($this->directory.$this->filename)) {
$pidFile = $this->directory.$this->filename;
if (!file_exists($pidFile)) {
return false;
}

if (!is_writable($pidFile)) {
throw new \Exception('Can not write to file: '.$pidFile);
}

return unlink($this->directory.$this->filename);
return unlink($pidFile);
}

private function checkDirExists()
Expand Down

0 comments on commit ccde89c

Please sign in to comment.