Skip to content

Commit

Permalink
Merge pull request #1546 from samsonasik/ext-imagick-check
Browse files Browse the repository at this point in the history
add extension_loaded('imagick') and class_exists('Imagick') check at ImageMagickHandler::__construct
  • Loading branch information
lonnieezell authored Nov 27, 2018
2 parents 74c809a + e30e3d3 commit cdff909
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions system/Images/Handlers/ImageMagickHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ class ImageMagickHandler extends BaseHandler
public function __construct($config = null)
{
parent::__construct($config);

// We should never see this, so can't test it
// @codeCoverageIgnoreStart
if (! (extension_loaded('imagick') || class_exists('Imagick')))
{
throw ImageException::forMissingExtension('IMAGICK');
}
// @codeCoverageIgnoreEnd
}

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

0 comments on commit cdff909

Please sign in to comment.