Check that $_POST['auto_draft'] is set before accessing it. See #11889.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12991 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9ecd5ff925
commit
b9bc395359
|
@ -928,13 +928,13 @@ case 'autosave' : // The name of this action is hardcoded in edit_post()
|
|||
}
|
||||
$data = $message;
|
||||
} else {
|
||||
if ( '1' == $_POST['auto_draft'] )
|
||||
if ( isset( $_POST['auto_draft'] ) && '1' == $_POST['auto_draft'] )
|
||||
$id = 0; // This tells us it didn't actually save
|
||||
else
|
||||
$id = $post->ID;
|
||||
}
|
||||
|
||||
if ( $do_lock && $_POST['auto_draft'] != '1' && $id && is_numeric($id) )
|
||||
if ( $do_lock && ( isset( $_POST['auto_draft'] ) && ( $_POST['auto_draft'] != '1' ) ) && $id && is_numeric($id) )
|
||||
wp_set_post_lock( $id );
|
||||
|
||||
if ( $nonce_age == 2 ) {
|
||||
|
|
Loading…
Reference in New Issue