Intervention / image

PHP Image Processing
https://image.intervention.io
MIT License
13.84k stars 1.5k forks source link

Avoid warning on getimage call #1313

Closed VincentLanglet closed 5 months ago

VincentLanglet commented 5 months ago

Hi @olivervogel

I'm getting some

Warning: getimagesize(): PNG file corrupted by ASCII conversion

from this code.

Since, a !in_array check is thrown with an exception. The warning should be muted.

olivervogel commented 5 months ago

Thanks for your PR. Can you provide an image file that produces this warning? I would like to take a closer look at the reasons for this.

VincentLanglet commented 5 months ago

Can you provide an image file that produces this warning? I would like to take a closer look at the reasons for this.

Unfortunately Warning: getimagesize(): PNG file corrupted by ASCII conversion is a log from my production, and since the user got an exception he didn't imported the image... so I don't have any example :/

olivervogel commented 5 months ago

so I don't have any example :/

That's ok. The changes still make sense.