Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#53764 closed defect (bug) (fixed)

Remove unused code from media.php file

Reported by: rudlinkon's profile rudlinkon Owned by: hellofromtonya's profile hellofromTonya
Milestone: 5.9 Priority: normal
Severity: normal Version: 5.9
Component: Media Keywords: has-patch commit
Focuses: coding-standards Cc:

Description

<?php // media_upload_form( $errors ); ?>

I've seen there are two places where the above code is keeping but those codes are commented so not in use.

Repository: wordpress-develop
Branch: master
Line Numbers: 2580 and 2882
File Path: /wp-admin/includes/media.php

Attachments (1)

53764.patch (1.1 KB) - added by rudlinkon 3 years ago.

Download all attachments as: .zip

Change History (6)

@rudlinkon
3 years ago

#1 @rudlinkon
3 years ago

  • Keywords has-patch added

#2 @SergeyBiryukov
3 years ago

  • Component changed from General to Media
  • Keywords has-copy-review removed
  • Milestone changed from Awaiting Review to 5.9

#3 follow-up: @hellofromTonya
3 years ago

  • Keywords commit added
  • Owner set to hellofromTonya
  • Status changed from new to accepted

Hello @rudlinkon,

Welcome to WordPress Core Trac! Thank you for this creating this ticket and submitting a patch.

Both instances were introduced in ticket #5911 with changesets [7043] and [7062] back in 2008. No reasons shared in the ticket or code why they were commented out. I didn't find changesets were they were reverted and made active.

53764.patch looks good to me. Seems safe to remove both. Will mark for commit consideration.

#4 in reply to: ↑ 3 @rudlinkon
3 years ago

Replying to hellofromTonya:

Thank you so much for your kind information @hellofromTonya

Hello @rudlinkon,

Welcome to WordPress Core Trac! Thank you for this creating this ticket and submitting a patch.

Both instances were introduced in ticket #5911 with changesets [7043] and [7062] back in 2008. No reasons shared in the ticket or code why they were commented out. I didn't find changesets were they were reverted and made active.

53764.patch looks good to me. Seems safe to remove both. Will mark for commit consideration.

#5 @SergeyBiryukov
3 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 51484:

Media: Remove unused code from wp-admin/includes/media.php.

Folow-up to [7043], [7062].

Props rudlinkon, hellofromTonya.
Fixes #53764.

Note: See TracTickets for help on using tickets.