php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49250 issue with ImageSetTile when image hander goes out of scope
Submitted: 2009-08-14 13:25 UTC Modified: 2016-07-24 04:22 UTC
From: pookey at pookey dot co dot uk Assigned: pajoye (profile)
Status: No Feedback Package: GD related
PHP Version: 5.3.0 OS: *
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-08-14 13:25 UTC] 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.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-16 01:56 UTC] cmb@php.net
-Status: Assigned +Status: Feedback
 [2016-07-16 01:56 UTC] cmb@php.net
> author is very lazy, no reproduction code I'm afraid.

I'm also very lazy, so no bugfix, I'm afraid. ;-)

Please provide a minimal reproduce script.
 [2016-07-24 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 00:01:28 2024 UTC