Skip to content

Commit c949b46

Browse files
committed
Fix bugbot - Mismatched array keys between error and success paths
1 parent 956c556 commit c949b46

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

inc/Helpers/Misc.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
function get_file_infos( int $file_id ): array {
1313
$file_href = wp_get_attachment_url( $file_id );
1414
$file_infos = [
15-
'href' => '',
16-
'file_name' => '',
17-
'path' => '',
18-
'size' => '',
19-
'ext' => '',
20-
'caption' => '',
15+
'file_name' => '',
16+
'details' => '',
17+
'details_accessible' => '',
18+
'href' => '',
19+
'caption' => '',
20+
'icon' => get_file_icon( '' ),
2121
];
2222

2323
if ( empty( $file_href ) ) {
@@ -113,7 +113,6 @@ function get_accessible_file_size_label( string $file_size ): string {
113113
* @return string
114114
*/
115115
function get_file_icon( string $file_ext ): string {
116-
117116
$file_icon = 'file';
118117

119118
if ( in_array( $file_ext, [ 'jpg', 'jpeg', 'png', 'gif', 'webp', 'svg', 'bmp', 'ico' ], true ) ) {

0 commit comments

Comments
 (0)