diff --git a/app/edit/filelist.php b/app/edit/filelist.php index 2fc19c56fa..8ee59f80a8 100644 --- a/app/edit/filelist.php +++ b/app/edit/filelist.php @@ -45,7 +45,7 @@ else { $htmlfilelist = ''; $dirlist = opendir($dir); $dir_array = array(); - while (false !== ($file = readdir($dirlist))) { + if($dirlist !== false) while (false !== ($file = readdir($dirlist))) { if ($file != "." AND $file != ".."){ $newpath = $dir.'/'.$file; $level = explode('/',$newpath); diff --git a/app/edit/fileoptionslist.php b/app/edit/fileoptionslist.php index 52124d2bfd..3b8d23b042 100644 --- a/app/edit/fileoptionslist.php +++ b/app/edit/fileoptionslist.php @@ -49,7 +49,7 @@ else { $htmlfilelist = ''; $dirlist = opendir($dir); $dir_array = array(); - while (false !== ($file = readdir($dirlist))) { + if($dirlist !== false) while (false !== ($file = readdir($dirlist))) { if ($file != "." AND $file != ".."){ $newpath = $dir.'/'.$file; $level = explode('/',$newpath);