Make WordPress Core

Changeset 31896


Ignore:
Timestamp:
03/26/2015 01:44:03 AM (10 years ago)
Author:
boonebgorges
Message:

Check that $_POST array index is set before comparing it in post_preview().

This prevents PHP notices in cases where a user with 'edit_others_posts' but
without 'publish_posts' previews another user's posts.

Props tyxla.
Fixes #31760.

File:
1 edited

Legend:

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

    r31730 r31896  
    16681668        $is_autosave = true;
    16691669
    1670         if ( 'auto-draft' == $_POST['post_status'] )
     1670        if ( isset( $_POST['post_status'] ) && 'auto-draft' == $_POST['post_status'] )
    16711671            $_POST['post_status'] = 'draft';
    16721672
Note: See TracChangeset for help on using the changeset viewer.