From 5141747487fc4fc38f13f98108846e60b179926b Mon Sep 17 00:00:00 2001 From: markjaquith Date: Fri, 31 Jul 2009 09:35:59 +0000 Subject: [PATCH] Fix some default widget PHP notices. props mrmist. fixes #10225 git-svn-id: http://svn.automattic.com/wordpress/trunk@11757 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-widgets.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index 1b1cc3fbdb..eedf4c6d26 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -406,7 +406,7 @@ class WP_Widget_Text extends WP_Widget { -

/> 

+

/> 

'') ); $title = esc_attr( $instance['title'] ); - $count = (bool) $instance['count']; - $hierarchical = (bool) $instance['hierarchical']; - $dropdown = (bool) $instance['dropdown']; + $count = isset($instance['count']) ? (bool) $instance['count'] :false; + $hierarchical = isset( $instance['hierarchical'] ) ? (bool) $instance['hierarchical'] : false; + $dropdown = isset( $instance['dropdown'] ) ? (bool) $instance['dropdown'] : false; ?>

@@ -579,8 +579,8 @@ class WP_Widget_Recent_Posts extends WP_Widget { } function form( $instance ) { - $title = esc_attr($instance['title']); - if ( !$number = (int) $instance['number'] ) + $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; + if ( !isset($instance['number']) || !$number = (int) $instance['number'] ) $number = 5; ?>

@@ -985,7 +985,7 @@ class WP_Widget_Tag_Cloud extends WP_Widget { function form( $instance ) { ?>

-

+