Changeset 8945

Show
Ignore:
Timestamp:
09/21/08 20:57:04 (4 months ago)
Author:
westi
Message:

Notice fixes for the widgets admin page see #7509.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/includes/widgets.php

    r8944 r8945  
    225225    $sidebar_id = isset($sidebar_args['id']) ? $sidebar_args['id'] : false; 
    226226 
    227     $control = $wp_registered_widget_controls[$widget_id]
     227    $control = isset($wp_registered_widget_controls[$widget_id]) ? $wp_registered_widget_controls[$widget_id] : 0
    228228    $widget  = $wp_registered_widgets[$widget_id]; 
    229229 
  • trunk/wp-includes/widgets.php

    r8935 r8945  
    681681function wp_widget_pages_control() { 
    682682    $options = $newoptions = get_option('widget_pages'); 
    683     if ( $_POST['pages-submit'] ) { 
     683    if ( isset($_POST['pages-submit']) ) { 
    684684        $newoptions['title'] = strip_tags(stripslashes($_POST['pages-title'])); 
    685685 
     
    812812function wp_widget_archives_control() { 
    813813    $options = $newoptions = get_option('widget_archives'); 
    814     if ( $_POST["archives-submit"] ) { 
     814    if ( isset($_POST["archives-submit"]) ) { 
    815815        $newoptions['count'] = isset($_POST['archives-count']); 
    816816        $newoptions['dropdown'] = isset($_POST['archives-dropdown']); 
     
    872872function wp_widget_meta_control() { 
    873873    $options = $newoptions = get_option('widget_meta'); 
    874     if ( $_POST["meta-submit"] ) { 
     874    if ( isset($_POST["meta-submit"]) ) { 
    875875        $newoptions['title'] = strip_tags(stripslashes($_POST["meta-title"])); 
    876876    } 
     
    917917function wp_widget_calendar_control() { 
    918918    $options = $newoptions = get_option('widget_calendar'); 
    919     if ( $_POST["calendar-submit"] ) { 
     919    if ( isset($_POST["calendar-submit"]) ) { 
    920920        $newoptions['title'] = strip_tags(stripslashes($_POST["calendar-title"])); 
    921921    } 
     
    13681368function wp_widget_recent_entries_control() { 
    13691369    $options = $newoptions = get_option('widget_recent_entries'); 
    1370     if ( $_POST["recent-entries-submit"] ) { 
     1370    if ( isset($_POST["recent-entries-submit"]) ) { 
    13711371        $newoptions['title'] = strip_tags(stripslashes($_POST["recent-entries-title"])); 
    13721372        $newoptions['number'] = (int) $_POST["recent-entries-number"]; 
     
    14511451function wp_widget_recent_comments_control() { 
    14521452    $options = $newoptions = get_option('widget_recent_comments'); 
    1453     if ( $_POST["recent-comments-submit"] ) { 
     1453    if ( isset($_POST["recent-comments-submit"]) ) { 
    14541454        $newoptions['title'] = strip_tags(stripslashes($_POST["recent-comments-title"])); 
    14551455        $newoptions['number'] = (int) $_POST["recent-comments-number"]; 
     
    19051905    $options = $newoptions = get_option('widget_tag_cloud'); 
    19061906 
    1907     if ( $_POST['tag-cloud-submit'] ) { 
     1907    if ( isset($_POST['tag-cloud-submit']) ) { 
    19081908        $newoptions['title'] = strip_tags(stripslashes($_POST['tag-cloud-title'])); 
    19091909    }