Handle Empty $dirs Array

This commit is contained in:
seiichiro 2022-01-11 17:27:47 +01:00
parent 9b10de412e
commit dcce7db043

View file

@ -76,7 +76,8 @@ if (isset($_GET['f'])) {
// Sort and Reverse Filelist // Sort and Reverse Filelist
natcasesort($files); natcasesort($files);
$files = array_reverse($files); $files = array_reverse($files);
$files = array_merge($dirs, $files); if (!empty($dirs))
$files = array_merge($dirs, $files);
// Get Files for current Page // Get Files for current Page
$curfiles = array_slice($files, ($page-1)*$slice ,$slice, true); $curfiles = array_slice($files, ($page-1)*$slice ,$slice, true);