From: pookey at pookey dot co dot uk
Operating system: N/A
PHP version: 5.3.0
PHP Bug Type: GD related
Bug description: issue with ImageSetTile when image hander goes out of scope
Description:
------------
here's a method in an object:
public function setTilePath($path)
{
$bgimage = imageCreateFromPNG($path);
ImageSetTile($this->imgHdl, $bgimage);
}
that tile is used elsewhere in a different method later
in 5.2, this works. in 5.3, it only works if I amend it to be:
public function setTilePath($path)
{
$this->bgimage = imageCreateFromPNG($path);
ImageSetTile($this->imgHdl, $this->bgimage);
}
I spoke briefly about this with Pierre online, I'm pookey on freenode if
anyone wants to talk to me about it.
Reproduce code:
---------------
author is very lazy, no reproduction code I'm afraid.
Expected result:
----------------
I expect it to work despite going out of scope
Actual result:
--------------
It doesn't work, broken, fail, no image, unhappy coder.
--
Edit bug report at http://bugs.php.net/?id=49250&edit=1
--
Try a snapshot (PHP 5.2):
http://bugs.php.net/fix.php?id=49250&r=trysnapshot52
Try a snapshot (PHP 5.3):
http://bugs.php.net/fix.php?id=49250&r=trysnapshot53
Try a snapshot (PHP 6.0):
http://bugs.php.net/fix.php?id=49250&r=trysnapshot60
Fixed in SVN:
http://bugs.php.net/fix.php?id=49250&r=fixed
Fixed in SVN and need be documented:
http://bugs.php.net/fix.php?id=49250&r=needdocs
Fixed in release:
http://bugs.php.net/fix.php?id=49250&r=alreadyfixed
Need backtrace:
http://bugs.php.net/fix.php?id=49250&r=needtrace
Need Reproduce Script:
http://bugs.php.net/fix.php?id=49250&r=needscript
Try newer version:
http://bugs.php.net/fix.php?id=49250&r=oldversion
Not developer issue:
http://bugs.php.net/fix.php?id=49250&r=support
Expected behavior:
http://bugs.php.net/fix.php?id=49250&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=49250&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=49250&r=submittedtwice
register_globals:
http://bugs.php.net/fix.php?id=49250&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49250&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=49250&r=dst
IIS Stability:
http://bugs.php.net/fix.php?id=49250&r=isapi
Install GNU Sed:
http://bugs.php.net/fix.php?id=49250&r=gnused
Floating point limitations:
http://bugs.php.net/fix.php?id=49250&r=float
No Zend Extensions:
http://bugs.php.net/fix.php?id=49250&r=nozend
MySQL Configuration Error:
http://bugs.php.net/fix.php?id=49250&r=mysqlcfg