Bug #76521 [Opn->Ver]: getimagesize() fails on photos from Samsung S8
| From: | cmb@php.net | Date: | Fri, 22 Jun 2018 14:19:10 +0000 |
| Subject: | Bug #76521 [Opn->Ver]: getimagesize() fails on photos from Samsung S8 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215864@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=76521&edit=1
ID: 76521
Updated by: cmb@php.net
Reported by: opajaap at opajaap dot nl
Summary: getimagesize() fails on photos from Samsung S8
-Status: Open
+Status: Verified
Type: Bug
-Package: GD related
+Package: GetImageSize related
PHP Version: 7.1.18
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I can reproduce this on current PHP-7.2. As soon as the
$imageinfo parameter is given, getimagesize() returns FALSE
without any notice/warning.
Previous Comments:
------------------------------------------------------------------------
[2018-06-22 13:24:09] peehaa@php.net
What is the actually error getimagesize returns?
------------------------------------------------------------------------
[2018-06-22 13:20:00] opajaap at opajaap dot nl
Description:
------------
Seen on PHP 7.1.13 and 7.2.5
getimagesize() executed on a just uploaded photofile from a Samsung S8 phone does not return an
array.
Url to sample photo:
https://betatest.opajaap.nl/wp-content/wppa-depot/20180522_102730.jpg
Test script:
---------------
// $file = <filepath to just uploaded photofile (.jpg)
$src_size = @getimagesize( $file, $info );
// If the given file is not an image file, log error and exit
if ( ! $src_size ) {
echo ( sprintf( 'ERROR: File %s is not a valid picture file.', $file ) );
return false;
}
// This prints the errormessage, while the photo looks normal on a windows pc
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=76521&edit=1