mikepultz / netdns2

Native PHP DNS Resolver and Updater
https://netdns2.com/
Other
119 stars 64 forks source link

Check "filesize() > 0" before fread #113

Closed Spirit55555 closed 3 years ago

Spirit55555 commented 3 years ago

This fixes the following error in PHP 8: Fatal error: Uncaught ValueError: fread(): Argument #2 ($length) must be greater than 0

mikepultz commented 3 years ago

thanks @Spirit55555

I've checked-in a change to fix the issue, along with some other PHP 8 fixes. I'm going to do a more comprehensive PHP 8 validation before I tag a new release.

Mike