|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-04-09 12:53 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Dec 12 03:00:01 2025 UTC |
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