Make WordPress Core

Ticket #35521: 35521.patch

File 35521.patch, 856 bytes (added by iseulde, 9 years ago)
  • src/wp-includes/theme.php

     
    406406 * @staticvar array $found_themes
    407407 *
    408408 * @param bool $force Optional. Whether to force a new directory scan. Defaults to false.
    409  * @return array|false Valid themes found
     409 * @return array Valid themes found
    410410 */
    411411function search_theme_directories( $force = false ) {
    412412        global $wp_theme_directories;
    413         static $found_themes = null;
     413        static $found_themes = array();
    414414
    415415        if ( empty( $wp_theme_directories ) )
    416                 return false;
     416                return array();
    417417
    418418        if ( ! $force && isset( $found_themes ) )
    419419                return $found_themes;
    420420
    421         $found_themes = array();
    422 
    423421        $wp_theme_directories = (array) $wp_theme_directories;
    424422        $relative_theme_roots = array();
    425423