WordPress.org

Make WordPress Core

Changeset 12991


Ignore:
Timestamp:
02/06/10 14:56:10 (4 years ago)
Author:
westi
Message:

Check that $_POSTauto_draft? is set before accessing it. See #11889.

File:
1 edited

Legend:

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

    r12987 r12991  
    929929        $data = $message; 
    930930    } else { 
    931         if ( '1' == $_POST['auto_draft'] ) 
     931        if ( isset( $_POST['auto_draft'] ) && '1' == $_POST['auto_draft'] ) 
    932932            $id = 0; // This tells us it didn't actually save 
    933933        else 
     
    935935    } 
    936936 
    937     if ( $do_lock && $_POST['auto_draft'] != '1' && $id && is_numeric($id) ) 
     937    if ( $do_lock && ( isset( $_POST['auto_draft'] ) && ( $_POST['auto_draft'] != '1' ) ) && $id && is_numeric($id) ) 
    938938        wp_set_post_lock( $id ); 
    939939 
Note: See TracChangeset for help on using the changeset viewer.