supplied argument is not a valid Directory resource . (2 posts)

  1. dustinsilva
    Posted 7 years ago #

    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.

    I hope this is clear.

  2. Jeremy Clark
    Posted 7 years ago #

    If in your opinion this is a bug then the proper way of reporting it to the wordpress devs is through the trac. Do a search there first and see if someone else might be working on a solution right now.

Topic Closed

This topic has been closed to new replies.

About this Topic