From 99c157dbaf8a9ff206e36b0c14c919589b7b6d6c Mon Sep 17 00:00:00 2001 From: westi Date: Thu, 7 May 2009 06:57:28 +0000 Subject: [PATCH] Fix notices when the Recent_Comments widget has no settings git-svn-id: http://svn.automattic.com/wordpress/trunk@11228 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-widgets.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index cc3c96578a..e7db7b58fa 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -659,9 +659,8 @@ class WP_Widget_Recent_Comments extends WP_Widget { } function form( $instance ) { - $title = esc_attr($instance['title']); - if ( !$number = (int) $instance['number'] ) - $number = 5; + $title = isset($instance['title']) ? esc_attr($instance['title']) : ''; + $number = isset($instance['number']) ? absint($instance['number']) : 5; ?>