Use opendir instead of dir. Props nbachiyski. fixes #4450

git-svn-id: https://develop.svn.wordpress.org/trunk@5867 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2007-08-14 02:58:33 +00:00
parent 9d8324b07b
commit 3e5d2230d2
4 changed files with 28 additions and 19 deletions
+3 -2
View File
@@ -14,9 +14,9 @@ require_once ('admin-header.php');
// Load all importers so that they can register.
$import_loc = 'wp-admin/import';
$import_root = ABSPATH.$import_loc;
$imports_dir = @ dir($import_root);
$imports_dir = @ opendir($import_root);
if ($imports_dir) {
while (($file = $imports_dir->read()) !== false) {
while (($file = readdir($imports_dir) !== false) {
if ($file{0} == '.') {
continue;
} elseif (substr($file, -4) == '.php') {
@@ -24,6 +24,7 @@ if ($imports_dir) {
}
}
}
@closedir($imports_dir);
$importers = get_importers();