#49250 [Opn->Asn]: issue with ImageSetTile when image hander goes out of scope

From: Date: Fri, 14 Aug 2009 14:15:18 +0000
Subject: #49250 [Opn->Asn]: issue with ImageSetTile when image hander goes out of scope
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-141050@lists.php.net to get a copy of this message
ID: 49250 Updated by: pajoye@php.net Reported By: pookey at pookey dot co dot uk -Status: Open +Status: Assigned Bug Type: GD related Operating System: N/A PHP Version: 5.3.0 -Assigned To: +Assigned To: pajoye Previous Comments: ------------------------------------------------------------------------ [2009-08-14 13:25:02] pookey at pookey dot co dot uk 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 this bug report at http://bugs.php.net/?id=49250&edit=1

« previous php.bugs (#141050) next »