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:
parent
40035bf93e
commit
98d62f55bb
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue