diff --git a/plugins/barcode/barcode.php b/plugins/barcode/barcode.php index b1115011..1c29d10d 100644 --- a/plugins/barcode/barcode.php +++ b/plugins/barcode/barcode.php @@ -26,6 +26,10 @@ DEALINGS IN THE SOFTWARE. \****************************************************************************/ +// Check php-gd is installed +$testGD = get_extension_funcs("gd"); +if (!$testGD){ echo "The GD extension is not installed, please install using 'apt install php-gd', restart Apache, and try again"; exit; } + if (realpath(__FILE__) == realpath($_SERVER['SCRIPT_FILENAME'])) { if (isset($_POST['s']) && isset($_POST['d'])) { $generator = new barcode_generator(); @@ -3345,4 +3349,4 @@ class barcode_generator { 119, 238, 241, 207, 179, 75, 150, 1, ); -} \ No newline at end of file +}