From e0301f76ea9b77f7960ca10c1748019e8c2d6a19 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 19 Dec 2007 17:48:51 +0000 Subject: [PATCH] Avoid warning when import dir is empty. Props Viper007Bond. fixes #5395 git-svn-id: http://svn.automattic.com/wordpress/trunk@6411 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/import.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/import.php b/wp-admin/includes/import.php index 9835bb14d9..6752ed6ec0 100644 --- a/wp-admin/includes/import.php +++ b/wp-admin/includes/import.php @@ -2,7 +2,8 @@ function get_importers() { global $wp_importers; - uasort($wp_importers, create_function('$a, $b', 'return strcmp($a[0], $b[0]);')); + if ( is_array($wp_importers) ) + uasort($wp_importers, create_function('$a, $b', 'return strcmp($a[0], $b[0]);')); return $wp_importers; }