Bug #79746 [Nab]: Gd create a image resource, but `is_resource` reutrn false,

From: Date: Sat, 27 Jun 2020 07:56:02 +0000
Subject: Bug #79746 [Nab]: Gd create a image resource, but `is_resource` reutrn false,
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-227697@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=79746&edit=1 ID: 79746 Updated by: nikic@php.net Reported by: re2953 at 163 dot com Summary: Gd create a image resource, but is_resource reutrn false, Status: Not a bug Type: Bug Package: GD related Operating System: osx 10.15 PHP Version: 8.0.0alpha1 Block user comment: N Private report: N New Comment: To clarify, rather than checking is_resource($gd), it is preferred to check $gd !== false (for functions that can return a resource or false), as this will work in PHP 7 and PHP 8. Previous Comments: ------------------------------------------------------------------------ [2020-06-27 07:11:37] requinix@php.net Yes, for the people who test for resource types this is a BC break. That's why it's happening in 8.0 and not 7.x. ------------------------------------------------------------------------ [2020-06-27 03:11:15] re2953 at 163 dot com Description: ------------ Gd create a image resource, but is_resource reutrn false, and gettype return 'object'.It breaks the compatibility. ------------------------------------------------------------------------ -- Edit this bug report at https://bugs.php.net/bug.php?id=79746&edit=1

« previous php.bugs (#227697) next »