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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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

Add a Patch

Pull Requests

Add a Pull Request

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-2024 The PHP Group
All rights reserved.
Last updated: Sat May 04 06:01:35 2024 UTC