Skip to content

Commit

Permalink
Merge pull request #53 from ovidiupop/patch-1
Browse files Browse the repository at this point in the history
Update AssetsAutoCompressComponent.php
  • Loading branch information
skeeks-semenov authored Jul 21, 2019
2 parents 73e17ee + 3dc7e68 commit 47eebff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/AssetsAutoCompressComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,10 @@ public function readLocalFile($filePath)
if (!$file) {
throw new \Exception("Unable to open file: '{$filePath}'");
}
return fread($file, filesize($filePath));
$filesSize = filesize($filePath);
if($filesSize){
return fread($file, $filesSize);
}
fclose($file);
}
/**
Expand Down

0 comments on commit 47eebff

Please sign in to comment.