Make sure dir() returned a dir object.

git-svn-id: http://svn.automattic.com/wordpress/trunk@12434 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-12-17 19:56:05 +00:00
parent 40035bf93e
commit 98d62f55bb
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;