Bug #76521 [Opn]: getimagesize() fails on photos from Samsung S8
| From: | peehaa@php.net | Date: | Fri, 22 Jun 2018 13:24:11 +0000 |
| Subject: | Bug #76521 [Opn]: getimagesize() fails on photos from Samsung S8 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-215860@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: peehaa@php.net
Reported by: opajaap at opajaap dot nl
Summary: getimagesize() fails on photos from Samsung S8
Status: Open
Type: Bug
Package: GD related
PHP Version: 7.1.18
Block user comment: N
Private report: N
New Comment:
What is the actually error getimagesize returns?
Previous Comments:
------------------------------------------------------------------------
[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