Make WordPress Core


Ignore:
Timestamp:
11/10/2008 06:54:18 PM (16 years ago)
Author:
ryan
Message:

Notice fixes from DD32. see #7509

File:
1 edited

Legend:

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

    r9570 r9596  
    2626    if ( $update )
    2727        $post_data['ID'] = (int) $post_data['post_ID'];
    28     $post_data['post_content'] = $post_data['content'];
    29     $post_data['post_excerpt'] = $post_data['excerpt'];
     28    $post_data['post_content'] = isset($post_data['content']) ? $post_data['content'] : '';
     29    $post_data['post_excerpt'] = isset($post_data['excerpt']) ? $post_data['excerpt'] : '';
    3030    $post_data['post_parent'] = isset($post_data['parent_id'])? $post_data['parent_id'] : '';
    3131    if ( isset($post_data['trackback_url']) )
     
    7272        $post_data['post_status'] = 'pending';
    7373
    74     $previous_status = get_post_field('post_status',  $post_data['ID']);
     74    $previous_status = get_post_field('post_status',  isset($post_data['ID']) ? $post_data['ID'] : $post_data['temp_ID']);
    7575
    7676    // Posts 'submitted for approval' present are submitted to $_POST the same as if they were being published.
Note: See TracChangeset for help on using the changeset viewer.