From 98d6c31f84df6614bd3a8614da57543695e4c4f9 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Sun, 23 Jun 2013 08:20:08 +0000 Subject: [PATCH] Avoid an undefined index notice in WP_Widget_Recent_Posts::update(). props jrf. fixes #24577. git-svn-id: http://core.svn.wordpress.org/trunk@24504 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/default-widgets.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-includes/default-widgets.php b/wp-includes/default-widgets.php index 160b579f80..09d5811f1c 100644 --- a/wp-includes/default-widgets.php +++ b/wp-includes/default-widgets.php @@ -596,7 +596,7 @@ class WP_Widget_Recent_Posts extends WP_Widget { $instance = $old_instance; $instance['title'] = strip_tags($new_instance['title']); $instance['number'] = (int) $new_instance['number']; - $instance['show_date'] = (bool) $new_instance['show_date']; + $instance['show_date'] = isset( $new_instance['show_date'] ) ? (bool) $new_instance['show_date'] : false; $this->flush_widget_cache(); $alloptions = wp_cache_get( 'alloptions', 'options' );