JamesHeinrich / getID3

http://www.getid3.org/
Other
1.15k stars 245 forks source link

count($jpeg_header_data) may cause an error since PHP7.2 #320

Closed Li-Jiajie closed 3 years ago

Li-Jiajie commented 3 years ago

https://github.com/JamesHeinrich/getID3/blob/6e2e30fdbeec2b3136c3d80d0a81b7e0ae1504d5/getid3/module.tag.xmp.php#L201-L204

_get_jpeg_header_data in line 201 may return a boolean in some images or illegal files, so count($jpeg_header_data) in line 204 will cause an error since PHP 7.2.

PHP has been doing this since version 7.2: parameter must be an array or an object that implements Countable interface.

StudioMaX commented 3 years ago

@Li-Jiajie please try again with fixes from #321.