From dcce7db043808100f6a2f853d20177ee895b5b4a Mon Sep 17 00:00:00 2001 From: Stefan Brand Date: Tue, 11 Jan 2022 17:27:47 +0100 Subject: [PATCH] Handle Empty $dirs Array --- index.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.php b/index.php index 7e3c826..e67ffac 100644 --- a/index.php +++ b/index.php @@ -76,7 +76,8 @@ if (isset($_GET['f'])) { // Sort and Reverse Filelist natcasesort($files); $files = array_reverse($files); -$files = array_merge($dirs, $files); +if (!empty($dirs)) + $files = array_merge($dirs, $files); // Get Files for current Page $curfiles = array_slice($files, ($page-1)*$slice ,$slice, true);