WordPress.org

Make WordPress Core

Changeset 13068


Ignore:
Timestamp:
02/12/2010 08:14:17 PM (8 years ago)
Author:
ryan
Message:

Fix notices

Location:
trunk/wp-includes
Files:
2 edited

Legend:

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

    r12789 r13068  
    473473        $instance = $old_instance;
    474474        $instance['title'] = strip_tags($new_instance['title']);
    475         $instance['count'] = $new_instance['count'] ? 1 : 0;
    476         $instance['hierarchical'] = $new_instance['hierarchical'] ? 1 : 0;
    477         $instance['dropdown'] = $new_instance['dropdown'] ? 1 : 0;
     475        $instance['count'] = !empty($new_instance['count']) ? 1 : 0;
     476        $instance['hierarchical'] = !empty($new_instance['hierarchical']) ? 1 : 0;
     477        $instance['dropdown'] = !empty($new_instance['dropdown']) ? 1 : 0;
    478478
    479479        return $instance;
     
    740740
    741741    function update($new_instance, $old_instance) {
    742         $testurl = $new_instance['url'] != $old_instance['url'];
     742        $testurl = ( isset($new_instance['url']) && ($new_instance['url'] != $old_instance['url']) );
    743743        return wp_widget_rss_process( $new_instance, $testurl );
    744744    }
     
    940940    $url           = esc_url_raw(strip_tags( $widget_rss['url'] ));
    941941    $title         = trim(strip_tags( $widget_rss['title'] ));
    942     $show_summary  = (int) $widget_rss['show_summary'];
    943     $show_author   = (int) $widget_rss['show_author'];
    944     $show_date     = (int) $widget_rss['show_date'];
     942    $show_summary  = isset($widget_rss['show_summary']) ? (int) $widget_rss['show_summary'] : 0;
     943    $show_author   = isset($widget_rss['show_author']) ? (int) $widget_rss['show_author'] :0;
     944    $show_date     = isset($widget_rss['show_date']) ? (int) $widget_rss['show_date'] : 0;
    945945
    946946    if ( $check_feed ) {
  • trunk/wp-includes/general-template.php

    r13048 r13068  
    153153    else
    154154        $link = '<a href="' . esc_url( wp_logout_url($redirect) ) . '">' . __('Log out') . '</a>';
    155    
     155
    156156    if ( $echo )
    157157        echo apply_filters('loginout', $link);
     
    301301        $link = $before . '<a href="' . admin_url() . '">' . __('Site Admin') . '</a>' . $after;
    302302    }
    303    
     303
    304304    if ( $echo )
    305305        echo apply_filters('register', $link);
     
    10221022    $key = md5( $m . $monthnum . $year );
    10231023    if ( $cache = wp_cache_get( 'get_calendar', 'calendar' ) ) {
    1024         if ( is_array($cache) && isset( $cache[ $key ] ) ) {       
     1024        if ( is_array($cache) && isset( $cache[ $key ] ) ) {
    10251025            if ( $echo )
    10261026                echo apply_filters( 'get_calendar',  $cache[$key] );
    10271027            else
    1028                 return apply_filters( 'get_calendar',  $cache[$key] ); 
     1028                return apply_filters( 'get_calendar',  $cache[$key] );
    10291029        }
    10301030    }
     
    10881088    /* translators: Calendar caption: 1: month name, 2: 4-digit year */
    10891089    $calendar_caption = _x('%1$s %2$s', 'calendar caption');
    1090     $calendar_output .= '<table id="wp-calendar" summary="' . esc_attr__('Calendar') . '">
     1090    $calendar_output = '<table id="wp-calendar" summary="' . esc_attr__('Calendar') . '">
    10911091    <caption>' . sprintf($calendar_caption, $wp_locale->get_month($thismonth), date('Y', $unixmonth)) . '</caption>
    10921092    <thead>
     
    11041104        $calendar_output .= "\n\t\t<th scope=\"col\" title=\"$wd\">$day_name</th>";
    11051105    }
    1106    
     1106
    11071107    $calendar_output .= '
    11081108    </tr>
     
    12071207    $calendar_output .= "\n\t</tr>\n\t</tbody>\n\t</table>";
    12081208
    1209     $cache[ $key ] = $output;
     1209    $cache[ $key ] = $calendar_output;
    12101210    wp_cache_set( 'get_calendar', $cache, 'calendar' );
    12111211
Note: See TracChangeset for help on using the changeset viewer.