Make WordPress Core

Changeset 11824


Ignore:
Timestamp:
08/16/2009 01:56:21 AM (15 years ago)
Author:
azaozz
Message:

Fix warning in wp-admin/widgets.php when using Accessibility Mode on brand new install, fixes #10610

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/widgets.php

    r11503 r11824  
    253253    <div class="widget-position">
    254254    <table class="widefat"><thead><tr><th><?php _e('Sidebar'); ?></th><th><?php _e('Position'); ?></th></tr></thead><tbody>
    255 <?php   foreach ( $wp_registered_sidebars as $sbname => $sbvalue ) {
     255<?php
     256    foreach ( $wp_registered_sidebars as $sbname => $sbvalue ) {
    256257        echo "\t\t<tr><td><label><input type='radio' name='sidebar' value='" . esc_attr($sbname) . "'" . checked( $sbname, $sidebar, false ) . " /> $sbvalue[name]</label></td><td>";
    257258        if ( 'wp_inactive_widgets' == $sbname ) {
     
    260261            if ( !isset($sidebars_widgets[$sbname]) || !is_array($sidebars_widgets[$sbname]) ) {
    261262                $j = 1;
     263                $sidebars_widgets[$sbname] = array();
    262264            } else {
    263265                $j = count($sidebars_widgets[$sbname]);
  • trunk/wp-includes/widgets.php

    r11691 r11824  
    971971        $_sidebars_widgets = array();
    972972
    973         if ( isset($sidebars_widgets['wp_inactive_widgets']) )
     973        if ( isset($sidebars_widgets['wp_inactive_widgets']) || empty($sidebars_widgets) )
    974974            $sidebars_widgets['array_version'] = 3;
    975975        elseif ( !isset($sidebars_widgets['array_version']) )
Note: See TracChangeset for help on using the changeset viewer.