WordPress.org

Make WordPress Core

Ticket #19244: get_theme-array-check.patch

File get_theme-array-check.patch, 381 bytes (added by cgrymala, 2 years ago)
  • theme.php

     
    496496function get_theme($theme) { 
    497497        $themes = get_themes(); 
    498498 
    499         if ( array_key_exists($theme, $themes) ) 
     499        if ( is_array( $themes ) && array_key_exists($theme, $themes) ) 
    500500                return $themes[$theme]; 
    501501 
    502502        return null;