Skip to content

Conversation

@adamwathan
Copy link
Contributor

getimagesize will fail with a notice on files smaller than 12 bytes.
This ends up becoming an ErrorException which is pretty annoying.

Suppressing the warning is enough to still end up with a false result
which will fail the validation gracefully instead of grueing up your
stew.

`getimagesize` will fail with a notice on files smaller than 12 bytes.
This ends up becoming an ErrorException which is pretty annoying.

Suppressing the warning is enough to still end up with a `false` result
which will fail the validation gracefully instead of grueing up your
stew.
@taylorotwell taylorotwell merged commit 6f13147 into laravel:5.4 Feb 16, 2017
@GrahamCampbell GrahamCampbell changed the title Suppress getimagesize() warnings [5.4] Suppress getimagesize() warnings Feb 16, 2017
taylorotwell pushed a commit that referenced this pull request Feb 18, 2017
* Suppress getimagesize() warnings

Backport of #17944.

`getimagesize` will fail with a notice on files smaller than 12 bytes.
This ends up becoming an ErrorException which is pretty annoying.

Suppressing the warning is enough to still end up with a `false` result
which will fail the validation gracefully instead of grueing up your
stew.

* Proper float comparison in ratio validation

* Convert fixtures to PNG format

* Add test for validation of ratio with no fractional part
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants