Enable AVIF support in GD for PHP 8.1

This commit is contained in:
cytopia
2022-01-26 12:27:46 +01:00
parent b5c34feb7c
commit 015eaff5d0
4 changed files with 35 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
<?php
/**
* This page should print 'OK' if everything works,
* 'FAIL' or nothing if an error occured.
*/
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
// Only available since PHP 8.1.x
if (version_compare($PHP_VERSION, '8.1.0', '<=')) {
echo 'SKIP';
exit(0);
}
// Check for support
if (!function_exists('imageavif')) {
echo 'FAIL: imageavif()';
exit(1);
}
echo 'OK';