WordPress.org

Make WordPress Core

Changeset 10315


Ignore:
Timestamp:
01/05/09 23:04:05 (6 years ago)
Author:
ryan
Message:

Default to empty array if sidebars_widgets is not set. Don't unset array_version if not set. fixes #8804 for 2.7

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.7/wp-includes/widgets.php

    r10307 r10315  
    549549    global $wp_registered_widgets, $wp_registered_sidebars; 
    550550 
    551     $sidebars_widgets = get_option('sidebars_widgets'); 
     551    $sidebars_widgets = get_option('sidebars_widgets', array()); 
    552552    $_sidebars_widgets = array(); 
    553553 
     
    619619    } 
    620620 
    621     unset($sidebars_widgets['array_version']); 
     621    if ( isset($sidebars_widgets['array_version']) ) 
     622        unset($sidebars_widgets['array_version']); 
    622623 
    623624    $sidebars_widgets = apply_filters('sidebars_widgets', $sidebars_widgets); 
Note: See TracChangeset for help on using the changeset viewer.