Skip to content

Commit 10bd981

Browse files
authored
Throw RuntimeException for missing GD extension
1 parent 6e9f019 commit 10bd981

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎system/Images/Handlers/GDHandler.php‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
use Config\Images;
1818
use GdImage;
1919
use Override;
20+
use RuntimeException;
2021

2122
/**
2223
* Image handler for GD package
@@ -35,7 +36,10 @@ public function __construct($config = null)
3536
parent::__construct($config);
3637

3738
if (! extension_loaded('gd')) {
38-
throw ImageException::forMissingExtension('GD'); // @codeCoverageIgnore
39+
throw new RuntimeException(sprintf(
40+
'The "%s" handler requires the "gd" PHP extension.',
41+
static::class,
42+
));
3943
}
4044
}
4145

0 commit comments

Comments
 (0)