]> git.mjollnir.org Git - moodle.git/commitdiff
Bug fix in get_directory_list() for files named 0 :-)
authormoodler <moodler>
Sat, 17 Apr 2004 14:01:53 +0000 (14:01 +0000)
committermoodler <moodler>
Sat, 17 Apr 2004 14:01:53 +0000 (14:01 +0000)
lib/moodlelib.php

index 90e94c472fe86eac721c6743ab99e9bb4e0f5ba3..97925b629e337f294d448f2222d9fdedb1929f4c 100644 (file)
@@ -1535,7 +1535,7 @@ function get_directory_list($rootdir, $excludefile="", $descend=true) {
         return $dirs;
     }
 
-    while ($file = readdir($dir)) {
+    while (false !== ($file = readdir($dir))) {
         $firstchar = substr($file, 0, 1);
         if ($firstchar == "." or $file == "CVS" or $file == $excludefile) {
             continue;