From 014d9c06652072852894758ceb46f5587798888e Mon Sep 17 00:00:00 2001 From: bitbybit Date: Fri, 16 Aug 2013 18:35:10 +0400 Subject: [PATCH] Warning: opendir(path/to/dir): failed to open dir: No such file or directory Check if folder exists --- index.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.php b/index.php index 4957b95..45b0d04 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))) {