Make WordPress Core

Ticket #49239: async-upload.php.patch

File async-upload.php.patch, 556 bytes (added by pikamander2, 6 years ago)
  • async-upload.php

     
    4242if ( isset( $_REQUEST['attachment_id'] ) && intval( $_REQUEST['attachment_id'] ) && $_REQUEST['fetch'] ) {
    4343        $id   = intval( $_REQUEST['attachment_id'] );
    4444        $post = get_post( $id );
    45         if ( 'attachment' != $post->post_type ) {
     45        if ( 'attachment' !== $post->post_type ) {
    4646                wp_die( __( 'Invalid post type.' ) );
    4747        }
    4848        if ( ! current_user_can( 'edit_post', $id ) ) {