Fix php warning in widgets.php, props zeronex, fixes #9330

git-svn-id: https://develop.svn.wordpress.org/trunk@10789 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-03-15 11:18:09 +00:00
parent 2327dd41c7
commit 7efda16c61
1 changed files with 6 additions and 2 deletions

View File

@ -1355,8 +1355,10 @@ function wp_widget_text_control($widget_args) {
* @since 2.2.0
*/
function wp_widget_text_register() {
if ( !$options = get_option('widget_text') )
$options = get_option('widget_text');
if ( !is_array($options) )
$options = array();
$widget_ops = array('classname' => 'widget_text', 'description' => __('Arbitrary text or HTML'));
$control_ops = array('width' => 400, 'height' => 350, 'id_base' => 'text');
$name = __('Text');
@ -2153,8 +2155,10 @@ function wp_widget_rss_process( $widget_rss, $check_feed = true ) {
* @since 2.2.0
*/
function wp_widget_rss_register() {
if ( !$options = get_option('widget_rss') )
$options = get_option('widget_rss');
if ( !is_array($options) )
$options = array();
$widget_ops = array('classname' => 'widget_rss', 'description' => __( 'Entries from any RSS or Atom feed' ));
$control_ops = array('width' => 400, 'height' => 200, 'id_base' => 'rss');
$name = __('RSS');