Short list syntax can be used

Signed-off-by: Yuriy Pikhtarev <iglix@me.com>
This commit is contained in:
Yuriy Pikhtarev 2018-06-24 15:21:55 +03:00
commit 742575bb56
No known key found for this signature in database
GPG key ID: 3A9B5A757B48ECC6
7 changed files with 10 additions and 10 deletions

View file

@ -213,7 +213,7 @@ function display_attachments($post_id)
if (@(int)$display_categories[$attachments['_' . $post_id][$i]['extension']] == IMAGE_CAT && (int)$attach_config['img_display_inlined']) {
if ((int)$attach_config['img_link_width'] != 0 || (int)$attach_config['img_link_height'] != 0) {
list($width, $height) = image_getdimension($filename);
[$width, $height] = image_getdimension($filename);
if ($width == 0 && $height == 0) {
$image = true;

View file

@ -103,13 +103,13 @@ function create_thumbnail($source, $new_file, $mimetype)
return false;
}
list($width, $height, $type, ) = getimagesize($source);
[$width, $height, $type,] = getimagesize($source);
if (!$width || !$height) {
return false;
}
list($new_width, $new_height) = get_img_size_format($width, $height);
[$new_width, $new_height] = get_img_size_format($width, $height);
$tmp_path = $old_file = '';

View file

@ -689,13 +689,13 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false)
if (!is_array($default)) {
$type = gettype($default);
} else {
list($key_type, $type) = $default;
[$key_type, $type] = $default;
$type = gettype($type);
$key_type = gettype($key_type);
if ($type == 'array') {
reset($default);
$default = current($default);
list($sub_key_type, $sub_type) = $default;
[$sub_key_type, $sub_type] = $default;
$sub_type = gettype($sub_type);
$sub_type = ($sub_type == 'array') ? 'NULL' : $sub_type;
$sub_key_type = gettype($sub_key_type);