Skip to content

Commit

Permalink
Always return a string, even if the file is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
violuke authored Feb 14, 2018
1 parent 414c453 commit ee280ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/deploydog/Slavedriver/Slavedriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,12 @@ private function getMaxBytesOfLogFileToRead(){
}

private function readRemainderOfFile($file, $offset){
return file_get_contents($file, null, null, $offset, $this->getMaxBytesOfLogFileToRead());
$fileContents = file_get_contents($file, null, null, $offset, $this->getMaxBytesOfLogFileToRead());
if ($fileContents === false){
return '';
} else {
return $fileContents;
}
}

private function ensureSlaveNameSet(){
Expand Down

0 comments on commit ee280ab

Please sign in to comment.