From: kris dot hofmans at pandora dot be Operating system: Linux 2.6 PHP version: 5.0.0RC1 PHP Bug Type: Zend Engine 2 problem Bug description: GD image resource cannot be stored in class property
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 bug report at http://bugs.php.net/?id=27925&edit=1 -- Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=27925&r=trysnapshot4 Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=27925&r=trysnapshot5 Fixed in CVS: http://bugs.php.net/fix.php?id=27925&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=27925&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=27925&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=27925&r=needscript Try newer version: http://bugs.php.net/fix.php?id=27925&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=27925&r=support Expected behavior: http://bugs.php.net/fix.php?id=27925&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=27925&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=27925&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=27925&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=27925&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=27925&r=dst IIS Stability: http://bugs.php.net/fix.php?id=27925&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=27925&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=27925&r=float