php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39286 misleading error message with imagecreatefromgd2part()
Submitted: 2006-10-27 20:11 UTC Modified: 2006-12-31 22:03 UTC
From: seth at pricepages dot org Assigned: pajoye (profile)
Status: Closed Package: GD related
PHP Version: 5CVS-2006-10-27 (snap) OS: Mac 10.4
Private report: No CVE-ID: None
 [2006-10-27 20:11 UTC] seth at pricepages dot org
Description:
------------
This script results in the error message:
'http://leopold.sage.wisc.edu/world.vis.675.gd2' is not a 
valid GD2 file

But it *is* valid. The problem is that the parameter passed 
has zero width, but the error message is misleading.

Reproduce code:
---------------
<?php
$img = imagecreatefromgd2part('http://leopold.sage.wisc.edu/world.vis.675.gd2', 0, 100,0, 100);

/* This works fine:
$img = imagecreatefromgd2part('http://leopold.sage.wisc.edu/world.vis.675.gd2', 0, 100,100, 100);
*/

header('Content-Type: image/png');
imagepng($img);
?>


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-31 22:03 UTC] iliaa@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.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC