drop php7.3 support, make use of 7.4 features

This commit is contained in:
Shish
2021-03-14 23:43:50 +00:00
parent c558ee3bdb
commit 77f7121e26
296 changed files with 1571 additions and 2039 deletions

View File

@@ -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();