#27925 [Opn->Bgs]: GD image resource cannot be stored in class property
| From: | sniper@php.net | Date: | Fri, 09 Apr 2004 16:53:51 +0000 |
| Subject: | #27925 [Opn->Bgs]: GD image resource cannot be stored in class property | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-57875@lists.php.net to get a copy of this message | ||
ID: 27925
Updated by: sniper@php.net
Reported By: kris dot hofmans at pandora dot be
-Status: Open
+Status: Bogus
Bug Type: Zend Engine 2 problem
Operating System: Linux 2.6
PHP Version: 5.0.0RC1
New Comment:
Works fine with latest CVS snapshot. (http://snaps.php.net)
Previous Comments:
------------------------------------------------------------------------
[2004-04-08 20:04:44] kris dot hofmans at pandora dot be
Description:
------------
class jpegImage extends Image {
public function __construct($filename){ $this->image =
imagecreatefromjpeg($filename); }
}
After storing the image in $this->image it cannot be used in other GD
functions outside of the construct, it doesn't get recognized as a
resource
Reproduce code:
---------------
class Image {
private $image = null;
public function __construct($filename){ $this->image =
imagecreate(100,100); }
public function __destruct(){ imagedestroy($this->image); }
}
Expected result:
----------------
I'd expect the GD Image that can be used throught my class until it is
__destruct'd
Actual result:
--------------
supplied argument is not a valid Image resource
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=27925&edit=1