Make WordPress Core


Ignore:
Timestamp:
02/22/2008 05:43:56 PM (19 years ago)
Author:
ryan
Message:

Notice fixes from nbachiyski. fixes #5961

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r6954 r6983  
    88        die('-1');
    99
    10 if ( 'ajax-tag-search' == $_GET['action'] ) {
     10if ( isset($_GET['action']) && 'ajax-tag-search' == $_GET['action'] ) {
    1111        if ( !current_user_can( 'manage_categories' ) )
    1212                die('-1');
    … …  
    2121}
    2222
    23 $id = (int) $_POST['id'];
     23$id = isset($_POST['id'])? (int) $_POST['id'] : 0;
    2424switch ( $action = $_POST['action'] ) :
    2525case 'add-post' :
    … …  
    166166        if ( 0 > $parent = (int) $_POST['newcat_parent'] )
    167167                $parent = 0;
    168 
    169         $checked_categories = array_map( 'absint', (array) $_POST['post_category'] );
     168        $post_category = isset($_POST['post_category'])? (array) $_POST['post_category'] : array();
     169        $checked_categories = array_map( 'absint', (array) $post_category );
    170170
    171171        $x = new WP_Ajax_Response();
Note: See TracChangeset for help on using the changeset viewer.