Make WordPress Core


Ignore:
Timestamp:
05/07/2009 06:57:28 AM (15 years ago)
Author:
westi
Message:

Fix notices when the Recent_Comments widget has no settings

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/default-widgets.php

    r11204 r11228  
    660660
    661661    function form( $instance ) {
    662         $title = esc_attr($instance['title']);
    663         if ( !$number = (int) $instance['number'] )
    664             $number = 5;
     662        $title = isset($instance['title']) ? esc_attr($instance['title']) : '';
     663        $number = isset($instance['number']) ? absint($instance['number']) : 5;
    665664?>
    666665        <p><label for="<?php echo $this->get_field_id('title'); ?>">
Note: See TracChangeset for help on using the changeset viewer.