Bug #78052 [NEW]: exif_read_data chokes on strict_types for parameter 2

From: Date: Wed, 22 May 2019 19:10:51 +0000
Subject: Bug #78052 [NEW]: exif_read_data chokes on strict_types for parameter 2
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-220949@lists.php.net to get a copy of this message
From: c dot schiffler at cyberspectrum dot de Operating system: Linux PHP version: 7.3.5 Package: EXIF related Bug Type: Bug Bug description:exif_read_data chokes on strict_types for parameter 2 Description: ------------ Calling exif_read_data with null as second optional parameter results in a type error. This results in impossibility to call exif_read_data having different values for parameter 3&4 but sticking to the null default of parameter 2. Test script: --------------- declare(strict_types=1); // This errors out but should not. exif_read_data('image.jpg', null, true, false); // This is a workaround currently in use as internal functions are not affected by strict_types per https://bugs.php.net/bug.php?id=74750 call_user_func('exif_read_data', 'image.jpg', null, true, false); Expected result: ---------------- Data should be extracted. Actual result: -------------- TypeError: exif_read_data() expects parameter 2 to be string, null given -- Edit bug report at https://bugs.php.net/bug.php?id=78052&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=78052&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=78052&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=78052&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=78052&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=78052&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=78052&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=78052&r=needscript Try newer version: https://bugs.php.net/fix.php?id=78052&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=78052&r=support Expected behavior: https://bugs.php.net/fix.php?id=78052&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=78052&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=78052&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=78052&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=78052&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=78052&r=dst IIS Stability: https://bugs.php.net/fix.php?id=78052&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=78052&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=78052&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=78052&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=78052&r=mysqlcfg

« previous php.bugs (#220949) next »