forked from Cavemanon/cavepaintings
drop php7.3 support, make use of 7.4 features
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
class PixelFileHandler extends DataHandlerExtension
|
||||
{
|
||||
protected $SUPPORTED_MIME = [MimeType::JPEG, MimeType::GIF, MimeType::PNG, MimeType::WEBP];
|
||||
protected array $SUPPORTED_MIME = [MimeType::JPEG, MimeType::GIF, MimeType::PNG, MimeType::WEBP];
|
||||
|
||||
protected function media_check_properties(MediaCheckPropertiesEvent $event): void
|
||||
{
|
||||
@@ -35,10 +35,10 @@ class PixelFileHandler extends DataHandlerExtension
|
||||
return $info && in_array($info[2], $valid);
|
||||
}
|
||||
|
||||
protected function create_thumb(string $hash, string $type): bool
|
||||
protected function create_thumb(string $hash, string $mime): bool
|
||||
{
|
||||
try {
|
||||
create_image_thumb($hash, $type);
|
||||
create_image_thumb($hash, $mime);
|
||||
return true;
|
||||
} catch (InsufficientMemoryException $e) {
|
||||
$tsize = get_thumbnail_max_size_scaled();
|
||||
|
Reference in New Issue
Block a user