Make WordPress Core

Changeset 18462


Ignore:
Timestamp:
07/22/2011 10:57:34 AM (14 years ago)
Author:
dd32
Message:

Cast $themes to an array to avoid a PHP Warning when there are no themes currently installed. Fixes #18213

File:
1 edited

Legend:

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

    r18318 r18462  
    263263
    264264    $themes = get_themes();
    265     foreach ( $themes as $this_theme ) {
     265    foreach ( (array) $themes as $this_theme ) {
    266266        if ( is_array($this_theme) && $this_theme['Stylesheet'] == $api->slug ) {
    267267            if ( $this_theme['Version'] == $api->version ) {
Note: See TracChangeset for help on using the changeset viewer.