Edit report at http://bugs.php.net/bug.php?id=54723&edit=1
ID: 54723
User updated by: don at smugmug dot com
Reported by: don at smugmug dot com
Summary: getimagesize() incorrectly identifies files as ICO
which aren't
Status: Open
Type: Bug
Package: GetImageSize related
Operating System: CentOS 5.5
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
Grr. Instead of "are uploaded" that should read "are passed to
getimagesize()".
Sorry about that.
Previous Comments:
------------------------------------------------------------------------
[2011-05-12 19:12:45] don at smugmug dot com
Description:
------------
When certain types of files are uploaded, including .MPGs,
getimagesize()
incorrectly identifies them as ICOs with a MIME type of
'image/vnd.microsoft.icon'.
I suspect certain files probably have embedded icons in them, which is
what PHP is
detecting and reporting, but the actual file isn't an ICO.
A ~500K sample file can be found here:
http://www.smugmug.com/img/video/problem/php-getimagesize.mpg
Expected result:
----------------
I'd expect FALSE to return, since this isn't a picture and isn't a valid
type PHP
knows about.
Actual result:
--------------
It returns this array:
array(0 => 45,
1 => 82,
2 => 17,
3 => 'width="45" height="82"',
'bits' = 65023,
'mime' = 'image/vnd.microsoft.icon');
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54723&edit=1