WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/05/2012 01:05:49 AM (9 years ago)
Author:
nacin
Message:

Always return a WP_Theme object from wp_get_theme(). Check \$theme->exists() or \$theme->errors() to confirm the requested theme actually exists. see #20361.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/schema.php

    r20331 r20363  
    345345    // If default theme is a child theme, we need to get its template
    346346    $theme = wp_get_theme( $template );
    347     if ( $theme && ! $theme->errors() )
     347    if ( ! $theme->errors() )
    348348        $template = $theme->get_template();
    349349
Note: See TracChangeset for help on using the changeset viewer.