Closed michalkleiner closed 6 years ago
Thanks for taking the time to report this issue.
I had a go at replicating it, but didn't manage to. I got intervention to throw a warning in my face, but I had to hack the library to remove the error suppression on $data = @exif_read_data($image->dirname .'/'. $image->basename);
Could you give us more information about what version of EXIF you are running. What does your phpinfo();
printout say about it? FYI that's what I get.
Could you let us know exactly which version of intervention your are running? You can use composer to find out composer show intervention/image
.
Any chance you could attach a copy of the exact image that is causing the error?
Hi, thanks for the prompt reaction.
name : intervention/image
descrip. : Image handling and manipulation library with support for Laravel integration
keywords : gd, image, imagick, laravel, thumbnail, watermark
versions : * 2.4.1
type : library
license : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source : [git] https://github.com/Intervention/image.git 3603dbcc9a17d307533473246a6c58c31cf17919
dist : [zip] https://api.github.com/repos/Intervention/image/zipball/3603dbcc9a17d307533473246a6c58c31cf17919 3603dbcc9a17d307533473246a6c58c31cf17919
names : intervention/image
autoload
psr-4
Intervention\Image\ => src/Intervention/Image
requires
ext-fileinfo *
guzzlehttp/psr7 ~1.1
php >=5.4.0
requires (dev)
mockery/mockery ~0.9.2
phpunit/phpunit ^4.8 || ^5.7
suggests
ext-gd to use GD library based image processing.
ext-imagick to use Imagick based image processing.
intervention/imagecache Caching extension for the Intervention Image library
As an example, any PNG I tried did the same. This is the smallest I tested with:
Also the https://secure.php.net/manual/en/book.scream.php is not installed.
Looks like PHP is supposed to emit warnings if it can’t read the file (https://github.com/php/php-src/blob/1ccada35c08d35d87706c8c58cc72eebc80b718b/ext/exif/tests/bug62523_3.phpt). That doesn’t answer why:
I’ve seen PHP ignore @
before, so it’s possible that it’s a PHP bug. Comparing the two PHP versions above, nothing leaps out at me :/ https://github.com/php/php-src/compare/php-7.1.16...php-7.1.18
Sorry everyone, false alarm - there is a custom error handler used which actually turns everything into an exception :-/ Appreciate your time spent on this issue!
All good!
With Exif extension enabled on the server, when uploading a PNG image, the intervention backend is trying to get EXIF data from the file and it fails.