summaryrefslogtreecommitdiff
path: root/includes/file.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/file.inc')
-rw-r--r--includes/file.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/file.inc b/includes/file.inc
index 16f5c5629..0984190ce 100644
--- a/includes/file.inc
+++ b/includes/file.inc
@@ -884,7 +884,7 @@ function file_scan_directory($dir, $mask, $nomask = array('.', '..', 'CVS'), $ca
$files = array();
if (is_dir($dir) && $handle = opendir($dir)) {
- while ($file = readdir($handle)) {
+ while (false !== ($file = readdir($handle))) {
if (!in_array($file, $nomask) && $file[0] != '.') {
if (is_dir("$dir/$file") && $recurse) {
// Give priority to files in this folder by merging them in after any subdirectory files.