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

ImageMagick->save() return value #2151

Merged
merged 1 commit into from
Aug 28, 2019

Conversation

MGatner
Copy link
Member

@MGatner MGatner commented Aug 20, 2019

Description
In the Image Magick handler class, save() currently returns the result of process(), which is an array of the lines of output from exec(). This can cause a type error because the return type is defined as bool.

This PR changes save() to return true after process() calls, as process() will throw an exception on failure already and $output is unreliable for determining success or failure.

This resolves #2029.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@MGatner
Copy link
Member Author

MGatner commented Aug 26, 2019

@lonnieezell This is all set unless there is some bigger picture reason to do it differently.

@lonnieezell lonnieezell merged commit 7261a70 into codeigniter4:develop Aug 28, 2019
@MGatner MGatner deleted the magick-return branch August 28, 2019 10:39
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.

Imagick Image library handler return array instead of boolean
2 participants