Ticket #49239: media.php.patch
| File media.php.patch, 929 bytes (added by , 6 years ago) |
|---|
-
media.php
29 29 $location = 'media.php'; 30 30 $referer = wp_get_original_referer(); 31 31 if ( $referer ) { 32 if ( false !== strpos( $referer, 'upload.php' ) || ( url_to_postid( $referer ) == $attachment_id ) ) {32 if ( false !== strpos( $referer, 'upload.php' ) || ( url_to_postid( $referer ) === $attachment_id ) ) { 33 33 $location = $referer; 34 34 } 35 35 } … … 69 69 if ( 'attachment' !== $att->post_type ) { 70 70 wp_die( __( 'You attempted to edit an item that isn’t an attachment. Please go back and try again.' ) ); 71 71 } 72 if ( $att->post_status == 'trash' ) {72 if ( $att->post_status === 'trash' ) { 73 73 wp_die( __( 'You can’t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.' ) ); 74 74 } 75 75