JamesHeinrich / phpThumb

phpThumb() - The PHP thumbnail generator
Other
318 stars 98 forks source link

not defined IMAGETYPE_AVIF on php8 or lower #191

Closed bskade closed 2 years ago

bskade commented 2 years ago

I think adding code below in phpthumb.class.php after line 56 was intented (like for $predefined_IMG_constants), but forgotten

foreach ($predefined_IMAGETYPE_constants as $PHP_constant_name => $PHP_constant_value) {
    if (!defined($PHP_constant_name)) {
        define($PHP_constant_name, $PHP_constant_value);
    }
}
JamesHeinrich commented 2 years ago

Thanks, fixed in https://github.com/JamesHeinrich/phpThumb/commit/9914236397b1796e74e0fd681e13dfd7fd78467d

Mark-H commented 2 years ago

Hi @JamesHeinrich, could you tag a release with this fix so the update becomes available through composer? Just ran into this issue with 1.7.18-202208061319 and was about to send a PR when I realised it had already been fixed. :)

JamesHeinrich commented 2 years ago

https://github.com/JamesHeinrich/phpThumb/releases/tag/v1.7.19

Mark-H commented 2 years ago

Thank you 💙