From 81fcd0f019a3e6e38ed8fc1e8b7bf712aabb10b9 Mon Sep 17 00:00:00 2001 From: moodler Date: Sat, 17 Apr 2004 14:01:53 +0000 Subject: [PATCH] Bug fix in get_directory_list() for files named 0 :-) --- lib/moodlelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/moodlelib.php b/lib/moodlelib.php index 90e94c472f..97925b629e 100644 --- a/lib/moodlelib.php +++ b/lib/moodlelib.php @@ -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; -- 2.39.5