Make WordPress Core

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#37346 closed defect (bug) (fixed)

In wp-mail.php file there is one "dmonths" array variable which is never used

Reported by: vishalkakadiya's profile vishalkakadiya Owned by: ocean90's profile ocean90
Milestone: 4.6 Priority: normal
Severity: normal Version: 4.4
Component: Mail Keywords: has-patch
Focuses: Cc:

Description

In wp-mail.php there are unused $dmonths = array('Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'); array variable which define in loop which is never used in that file or any other wordpress core files.

I think this should be removed.

Attachments (3)

37346.patch (10.0 KB) - added by vishalkakadiya 8 years ago.
mail.patch (423 bytes) - added by vishalkakadiya 8 years ago.
37346_1.patch (423 bytes) - added by vishalkakadiya 8 years ago.

Download all attachments as: .zip

Change History (10)

#1 @vishalkakadiya
8 years ago

  • Keywords has-patch added

And also i found Formatting issues, coding standard is not as per WordPress Coding Standard. So I fixed also that.

#2 @vishalkakadiya
8 years ago

  • Summary changed from wp-mail.php file there are "dmonths" array variable which is not used to In wp-mail.php file there are "dmonths" array variable which is not used

#3 @vishalkakadiya
8 years ago

  • Summary changed from In wp-mail.php file there are "dmonths" array variable which is not used to In wp-mail.php file there is one "dmonths" array variable which is never used

#4 @SergeyBiryukov
8 years ago

  • Component changed from General to Mail
  • Keywords needs-refresh added

Hi @vishalkakadiya, thanks for the ticket!

Could you submit a patch without all the whitespace fixes? Large formatting cleanups are generally discouraged, see https://make.wordpress.org/core/2011/03/23/code-refactoring/.

Last edited 8 years ago by SergeyBiryukov (previous) (diff)

@vishalkakadiya
8 years ago

#5 @vishalkakadiya
8 years ago

Hi @SergeyBiryukov,

I attach new "37346_1.patch" file with new patch as you ask without white space fixes. Please check and let me know if anything else required.

Thanks.

#6 @ocean90
8 years ago

  • Keywords needs-refresh removed
  • Milestone changed from Awaiting Review to 4.6
  • Version changed from trunk to 4.4

Unused since [34864].

#7 @ocean90
8 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from new to closed

In 38045:

WP Mail: Remove an unused variable.

Unused since [34864].

Props vishalkakadiya.
Fixes #37346.

Note: See TracTickets for help on using tickets.