diff --git a/index.php b/index.php index 8263d2e..3b34575 100644 --- a/index.php +++ b/index.php @@ -158,7 +158,7 @@ $currentdir = GALLERY_ROOT . $thumbdir; //----------------------- $files = array(); $dirs = array(); - if ($handle = opendir($currentdir)) + if (is_directory($currentdir) && $handle = opendir($currentdir)) { while (false !== ($file = readdir($handle))) {