Make sure dir() returned a dir object. for 2.9

git-svn-id: http://svn.automattic.com/wordpress/branches/2.9@12435 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-12-17 19:57:04 +00:00
parent 7e2f6d83a9
commit 9e887aeb62
1 changed files with 2 additions and 0 deletions

View File

@ -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;