ID: 28016 Comment by: php at afdelingp dot dk Reported By: php at ter dot dk Status: Assigned Bug Type: Scripting Engine problem Operating System: * PHP Version: 4CVS, 5CVS (2004-04-16) Assigned To: derick New Comment:
I have created a patch for Piotr Pawlow's version of php_imlib 0.3, fixing this issue for imlib (though I think the PHP behavior is strange at best). http://www.afdelingp.dk/files/php-4.3.8-imlib-rsrc.diff Best regards, Morten K. Poulsen Previous Comments: ------------------------------------------------------------------------ [2004-06-15 15:59:54] admin at php dot kz have same bug with crack lib ------------------------------------------------------------------------ [2004-04-16 15:11:33] [EMAIL PROTECTED] Derick: I agree, just change gettype() too. And imlib / other extensions using the wrong way in registering resources should be fixed. The 'non-named' resource is meant for something else.. ------------------------------------------------------------------------ [2004-04-16 11:05:22] [EMAIL PROTECTED] If the imlib extension gives it a proper name then it should work fine, so I think it's also a bug there. ------------------------------------------------------------------------ [2004-04-16 08:37:21] php at ter dot dk But will it solve the problem in my situation? After all, I do have a resource by hand, and would be pretty sad if other functions wouldn't recognize it as a resource. I do agree though that making gettype not return "resource" for a closed resource (since is_resource() already does that). I just don't like the idea that these functions might not recognize my resource at all. - Peter Brodersen ------------------------------------------------------------------------ [2004-04-16 03:15:17] [EMAIL PROTECTED] No, the fix was correct. Close() in this case destroyed the resource data in the variable, so it's no longer a resource anymore. I think the correct thing to do here is to make gettype() not show "resource" either. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/28016 -- Edit this bug report at http://bugs.php.net/?id=28016&edit=1