From 98d62f55bba0bc1eb77ec42452b33f0669575974 Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 17 Dec 2009 19:56:05 +0000 Subject: [PATCH] Make sure dir() returned a dir object. git-svn-id: http://svn.automattic.com/wordpress/trunk@12434 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/theme.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wp-includes/theme.php b/wp-includes/theme.php index a2639103aa..ddea5cb817 100644 --- a/wp-includes/theme.php +++ b/wp-includes/theme.php @@ -353,6 +353,8 @@ function get_themes() { $template_files[] = "$template_directory/$file"; } elseif ( is_dir("$template_directory/$file") ) { $template_subdir = @ dir("$template_directory/$file"); + if ( !$template_subdir ) + continue; while ( ($subfile = $template_subdir->read()) !== false ) { if ( preg_match('|^\.+$|', $subfile) ) continue;