php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42870 getimagesize() on .ico images returns false
Submitted: 2007-10-05 16:38 UTC Modified: 2007-10-14 23:29 UTC
From: marian at devourmedia dot com Assigned: scottmac (profile)
Status: Closed Package: Feature/Change Request
PHP Version: 5.2.4 OS: Fedora
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: marian at devourmedia dot com
New email:
PHP Version: OS:

 

 [2007-10-05 16:38 UTC] marian at devourmedia dot com
Description:
------------
PHP code should return information about the .ico file.


Reproduce code:
---------------
$fpath="/tmp/test.ico";
$buffer=file_get_contents('http://www.favicon.com/favicon.ico');
file_put_contents($fpath,$buffer);
$result=getimagesize($fpath);
if(is_bool($result)) echo "Boolean result: ";
if(is_string($result)) echo "String result: ";
if(is_numeric($result)) echo "Numeric result: ";
if(is_array($result)) echo "Array result: ";
echo "'";
print_r($result);
echo "'";

Expected result:
----------------
Instead of returning "Array result: " and the values,  it is returning "Boolean result:"

Actual result:
--------------
It is returning Boolean result which is false.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-05 17:28 UTC] scottmac@php.net
There is currently no support for icons, but the format is near identical to BMP.
 [2007-10-13 18:10 UTC] scottmac@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

icon support will be in 5.3.0+
 [2007-10-14 23:29 UTC] marian at devourmedia dot com
Thank you.

In my opinion .ico support should be built into php since 4.0
(especially because it is a close format to BMP so easy to add)

If you look here:
http://en.wikipedia.org/wiki/Favicon
you will understand why the importance.

However, thank you very much for adding it.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 03 18:01:30 2025 UTC