From b06746460e276b57d65d2fd807e17f1f25731e22 Mon Sep 17 00:00:00 2001 From: 3D-I Date: Sat, 27 Feb 2021 22:09:17 +0100 Subject: [PATCH] [ticket/16712] Implement thumbnails for WEBP images in attachments Use short array syntax PHPBB3-16712 --- phpBB/includes/functions_posting.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/phpBB/includes/functions_posting.php b/phpBB/includes/functions_posting.php index c4e917e1c0..43492f5eee 100644 --- a/phpBB/includes/functions_posting.php +++ b/phpBB/includes/functions_posting.php @@ -551,8 +551,8 @@ function get_supported_image_types($type = false) } else { - $new_type = array(); - $go_through_types = array(IMG_GIF, IMG_JPG, IMG_PNG, IMG_WBMP, IMG_WEBP); + $new_type = []; + $go_through_types = [IMG_GIF, IMG_JPG, IMG_PNG, IMG_WBMP, IMG_WEBP]; foreach ($go_through_types as $check_type) { @@ -563,14 +563,14 @@ function get_supported_image_types($type = false) } } - return array( + return [ 'gd' => ($new_type) ? true : false, 'format' => $new_type, 'version' => (function_exists('imagecreatetruecolor')) ? 2 : 1 - ); + ]; } - return array('gd' => false); + return ['gd' => false]; } /**