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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: pookey at pookey dot co dot uk
New email:
PHP Version: OS:

 

 [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

Pull Requests

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: Thu Dec 26 12:01:30 2024 UTC