Make WordPress Core

Ticket #43374: 43374.2.diff

File 43374.2.diff, 543 bytes (added by lbenicio, 5 years ago)
  • src/wp-includes/theme.php

    diff --git a/src/wp-includes/theme.php b/src/wp-includes/theme.php
    index 2a2922950d..f350d3b86c 100644
    a b function get_template_directory_uri() { 
    369369 */
    370370function get_theme_roots() {
    371371        global $wp_theme_directories;
    372 
    373         if ( count( $wp_theme_directories ) <= 1 ) {
     372       
     373        // count() does not check the value before performin so we have to verify if empty first.
     374        if ( empty( $wp_theme_directories ) || count( $wp_theme_directories ) <= 1 ) {
    374375                return '/themes';
    375376        }