Skip to content

Re-run getimagesize without source_info if false #86

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 2, 2017

Conversation

brianfreytag
Copy link
Contributor

Certain JPG images fail to get the $image_info variable when
$this->source_info is set in the getimagesize function if the exif data
is not what PHP is expecting. This ends up throwing exceptions instead
of letting them through as though they do not have exif data.

To allow valid images to make it through, we need to check to see if we
can retreive $image_info via getimagesize WITH $this->source_info, if
not (getimagesize returns FALSE), then get the $image_info without the
$this->source_info. Then it will fall back to throwing the
ImageResizeException if it still does not exist.

Certain JPG images fail to get the $image_info variable when
$this->source_info is set in the getimagesize function if the exif data
is not what PHP is expecting. This ends up throwing exceptions instead
of letting them through as though they do not have exif data.

To allow valid images to make it through, we need to check to see if we
can retreive $image_info via getimagesize WITH $this->source_info, if
not (getimagesize returns FALSE), then get the $image_info without the
$this->source_info. Then it will fall back to throwing the
ImageResizeException if it still does not exist.
@adityapatadia
Copy link
Contributor

Why add composer.lock to gitignore?

@brianfreytag
Copy link
Contributor Author

Because composer.lock should not be committed up in a library. That should be generated each time a new engineer runs composer install so they know they are getting the freshest version of the dependencies available.

@adityapatadia adityapatadia merged commit 6c3adec into gumlet:master Aug 2, 2017
@brianfreytag brianfreytag deleted the image_size branch August 2, 2017 12:34
@brianfreytag
Copy link
Contributor Author

@adityapatadia will you tag this, please?

@brianfreytag brianfreytag restored the image_size branch August 3, 2017 14:08
@adityapatadia
Copy link
Contributor

done.

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