diff --git a/src/AssetsAutoCompressComponent.php b/src/AssetsAutoCompressComponent.php index 29c1777..daba733 100644 --- a/src/AssetsAutoCompressComponent.php +++ b/src/AssetsAutoCompressComponent.php @@ -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); } /**