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
This commit is contained in:
Sergey Biryukov 2013-06-23 08:20:08 +00:00
parent 3be3080228
commit 98d6c31f84
1 changed files with 1 additions and 1 deletions

View File

@ -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' );