mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 21:00:21 +00:00
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:
+3
-2
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user