Skip to content
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

Cleanup of getMimeType() #1534

Merged
merged 1 commit into from
May 12, 2021
Merged

Cleanup of getMimeType() #1534

merged 1 commit into from
May 12, 2021

Conversation

woutersamaey
Copy link
Contributor

@woutersamaey woutersamaey commented Apr 8, 2021

Description (*)

  • Removed unneeded call to image_type_to_mime_type() because the mime type is already determined by getimagesize()
  • Removed returning $this->_fileType. This is NOT the mime type and not in use anywhere, so safe to remove.
  • More readable code
  • New exception if image is unreadable

If you prefer, I can move this to 20.x as well, but should not be an issue I believe.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)

- Removed unneeded call to image_type_to_mime_type() because the mime type is already determined by getimagesize()
- Removed returning $this->_fileType. This is NOT the mime type and not in use anywhere, so safe to remove.
- More readable code
- New exception if image is unreadable
@github-actions github-actions bot added Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/* labels Apr 8, 2021
@kkrieger85 kkrieger85 merged commit 6b9ab07 into OpenMage:1.9.4.x May 12, 2021
@github-actions
Copy link
Contributor

Unit Test Results

1 files  ±0  1 suites  ±0   0s ⏱️ ±0s
0 tests ±0  0 ✔️ ±0  0 💤 ±0  0 ❌ ±0 
6 runs  +4  4 ✔️ +2  2 💤 +2  0 ❌ ±0 

Results for commit 6b9ab07. ± Comparison against base commit 242a99b.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: lib/Varien Relates to lib/Varien Component: lib/* Relates to lib/*
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants