WordPress.org

Make WordPress Core

Changeset 10314


Ignore:
Timestamp:
01/05/2009 11:03:17 PM (9 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 trunk

File:
1 edited

Legend:

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

    r10308 r10314  
    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.