mediact / dependency-guard

Static production dependency analysis.
MIT License
83 stars 5 forks source link

1.0.3 - Fix fread call when file size is zero #16

Closed janmartenjongerius closed 6 years ago

janmartenjongerius commented 6 years ago

When the file size is zero, the call to SplFileObject::fread fails, because it only accepts a size greater than zero. This has been fixed by testing the size and optionally falling back to an empty string.

The unit test has been expanded to prevent regression.

Fixes #15