Skip to content

Commit

Permalink
Merge pull request #2151 from MGatner/magick-return
Browse files Browse the repository at this point in the history
ImageMagick->save() return value
  • Loading branch information
lonnieezell authored Aug 28, 2019
2 parents 6af9416 + 1803304 commit 7261a70
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions system/Images/Handlers/ImageMagickHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,9 +232,10 @@ public function getVersion(): string
* @param string $action
* @param integer $quality
*
* @return ImageMagickHandler|boolean
* @return array Lines of output from shell command
* @throws \Exception
*/
protected function process(string $action, int $quality = 100)
protected function process(string $action, int $quality = 100): array
{
// Do we have a vaild library path?
if (empty($this->config->libraryPath))
Expand Down Expand Up @@ -303,8 +304,8 @@ public function save(string $target = null, int $quality = 90): bool
$result = $this->process($action, $quality);

unlink($this->resource);

return $result;
return true;
}

//--------------------------------------------------------------------
Expand Down

0 comments on commit 7261a70

Please sign in to comment.