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
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: seth at pricepages dot org
New email:
PHP Version: OS:

 

 [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: Fri Apr 19 08:01:28 2024 UTC