Warning: opendir(path/to/dir): failed to open dir: No such file or directory

Check if folder exists
This commit is contained in:
bitbybit 2013-08-16 18:35:10 +04:00
parent f9174bd807
commit 014d9c0665
1 changed files with 1 additions and 1 deletions

View File

@ -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)))
{