|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2018-06-22 13:20 UTC] 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 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 02:00:01 2025 UTC |
Works for me. Array ( [0] => 4032 [1] => 3024 [2] => 2 [3] => width="4032" height="3024" [bits] => 8 [channels] => 3 [mime] => image/jpeg ) The @ will hide errors. If you have a problem then hiding errors is not good. Remove the @.