Make WordPress Core


Ignore:
Timestamp:
08/25/2008 09:50:11 PM (16 years ago)
Author:
ryan
Message:

Notice fixes. see #7509

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/post.php

    r8691 r8732  
    1818    $_POST['post_excerpt'] = $_POST['excerpt'];
    1919    $_POST['post_parent'] = isset($_POST['parent_id'])? $_POST['parent_id'] : '';
    20     $_POST['to_ping'] = $_POST['trackback_url'];
     20    if ( isset($_POST['trackback_url']) )
     21        $_POST['to_ping'] = $_POST['trackback_url'];
    2122
    2223    if (!empty ( $_POST['post_author_override'] ) ) {
     
    3031    }
    3132
    32     if ( $_POST['post_author'] != $_POST['user_ID'] ) {
     33    if ( isset($_POST['user_ID']) && ($_POST['post_author'] != $_POST['user_ID']) ) {
    3334        if ( 'page' == $_POST['post_type'] ) {
    3435            if ( !current_user_can( 'edit_others_pages' ) ) {
     
    6768                $_POST['post_status'] = 'pending';
    6869    } else {
    69         if ( 'publish' == $_POST['post_status'] && !current_user_can( 'publish_posts' ) ) :
     70        if ( isset($_POST['post_status']) && ('publish' == $_POST['post_status'] && !current_user_can( 'publish_posts' )) ) :
    7071            // Stop attempts to publish new posts, but allow already published posts to be saved if appropriate.
    7172            if ( $previous_status != 'publish' OR !current_user_can( 'edit_published_posts') )
Note: See TracChangeset for help on using the changeset viewer.