[wp-trac] [WordPress Trac] #5768: Warning: closedir(): supplied argument is not a valid Directory resource in /wp-includes/theme.php on line 166

WordPress Trac wp-trac at lists.automattic.com
Mon Feb 4 18:50:21 GMT 2008


#5768: Warning: closedir(): supplied argument is not a valid Directory resource in
/wp-includes/theme.php on line 166
--------------------------+-------------------------------------------------
 Reporter:  dustinsilva   |       Owner:  anonymous                                        
     Type:  defect        |      Status:  new                                              
 Priority:  normal        |   Milestone:  2.6                                              
Component:  Optimization  |     Version:  2.3.2                                            
 Severity:  blocker       |    Keywords:  closedir, warning, not valid directory, theme.php
--------------------------+-------------------------------------------------
 Hello all! I recently upgraded to 2.3.2. I have 'warnings' enabled in
 apache and I get this warning while trying to change themes: 'Warning:
 closedir(): supplied argument is not a valid Directory resource in /wp-
 includes/theme.php on line 166'

 Basically line 166 of file 'theme.php' tries to closedir($theme_dir); and
 I checked the value of $theme_dir at failure, and $theme_dir = '';

 You wordpress Devs need to add 'if( is_dir($theme_dir))' to line 166,
 directly above @closedir(theme_dir)... incase $theme_dir isn't really a
 readable directory.

 or do whatever you think is necessary, but this would be handy addition to
 this file.

 Thank,
 I hope this is clear.

 Not sure what 'Milestone' is in ticket submission form.

-- 
Ticket URL: <http://trac.wordpress.org/ticket/5768>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list