Bug #80342 [NEW]: is_resource returns false

From: Date: Mon, 09 Nov 2020 12:48:43 +0000
Subject: Bug #80342 [NEW]: is_resource returns false
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-230222@lists.php.net to get a copy of this message
From: info at backups dot nl Operating system: ubuntu server PHP version: 8.0.0RC3 Package: *General Issues Bug Type: Bug Bug description:is_resource returns false Description: ------------ I am using the code below. in php 8.0 is_resource returns false on this code. I can rewrite that code of course but i want to understand why it now suddenly does not work anymore. Is this a bug or is this caused by the changes made in php 8.0? Please advice Thank you ! Test script: --------------- $file= '/var/public/wp-content/uploads/2020/11/image_001.jpg'; $image = imagecreatefromstring( file_get_contents( $file ) ); if ( !is_resource( $image ) ) return new WP_Error( 'error_loading_image', $image, $file ); -- Edit bug report at https://bugs.php.net/bug.php?id=80342&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80342&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80342&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80342&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80342&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80342&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80342&r=support Expected behavior: https://bugs.php.net/fix.php?id=80342&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80342&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80342&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80342&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80342&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80342&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80342&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80342&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80342&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80342&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80342&r=mysqlcfg

« previous php.bugs (#230222) next »