JamesHeinrich / phpThumb

phpThumb() - The PHP thumbnail generator
Other
315 stars 141 forks source link

not defined IMAGETYPE_AVIF on php8 or lower #191

Closed bskade closed 1 year ago

bskade commented 1 year 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 1 year ago

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

Mark-H commented 1 year 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 1 year ago

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

Mark-H commented 1 year ago

Thank you 💙