|  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
This script results in the error message:
'' 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:
$img = imagecreatefromgd2part('', 0, 100,0, 100);

/* This works fine:
$img = imagecreatefromgd2part('', 0, 100,100, 100);

header('Content-Type: image/png');


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-12-31 22:03 UTC]
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
Thank you for the report, and for helping us make PHP better.

PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sat Jun 03 18:06:02 2023 UTC