Skip to content

Commit

Permalink
Fixed a bug on displaying dir content for certain files.
Browse files Browse the repository at this point in the history
  • Loading branch information
parpalak committed Feb 10, 2024
1 parent 7baa6d8 commit fd41916
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions _admin/pict_lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,10 @@ function s2_get_files($dir)

if (strpos($item, '.') !== false && \in_array(pathinfo($item, PATHINFO_EXTENSION), $allowed_extensions, true)) {
$image_info = getImageSize(S2_IMG_PATH . $dir . '/' . $item);
$dim = $image_info[0] . '*' . $image_info[1];
$bits = ($image_info['bits'] ?? 0) * ($image_info['channels'] ?? 1);
if ($image_info !== false) {
$dim = $image_info[0] . '*' . $image_info[1];
$bits = ($image_info['bits'] ?? 0) * ($image_info['channels'] ?? 1);
}
}

($hook = s2_hook('fn_get_files_pre_output_item_merge')) ? eval($hook) : null;
Expand Down

0 comments on commit fd41916

Please sign in to comment.