diff --git a/index.php b/index.php index f5d957c..73d7901 100644 --- a/index.php +++ b/index.php @@ -106,7 +106,7 @@ if (!empty($curfiles)| !empty($dirs)) { if ($slice > 1) { if (!empty($curfiles)) { foreach ($curfiles as $index => $image) { - if (in_array($image, $dirs)) { + if (!empty($dirs) && in_array($image, $dirs)) { $data['dirs'][] = $image; } else { $tmp['n'] = $image;