MDL-10905 iterating correctly with readdir (as shown in php doc)

This commit is contained in:
nicolasconnault
2007-10-15 05:18:58 +00:00
parent 546526ed42
commit ed818bbdbf
13 changed files with 19 additions and 19 deletions
+1 -1
View File
@@ -54,7 +54,7 @@ function delete_subdirectories($rootdir) {
$dir = opendir($rootdir);
while ($file = readdir($dir)) {
while (false !== ($file = readdir($dir))) {
if ($file != '.' and $file != '..') {
$fullfile = $rootdir .'/'. $file;
if (filetype($fullfile) == 'dir') {