Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#47422 closed enhancement (fixed)

Coding Standards: wp-admin/includes/ms.php

Reported by: davidbaumwald Owned by: SergeyBiryukov
Priority: normal Milestone: 5.9
Component: Networks and Sites Version: 5.3
Severity: minor Keywords: has-patch good-first-bug commit
Cc: Focuses: multisite, coding-standards

Description

Non-Yoda conditions, loose comparisons, loop/conditional assignments, unnecessary condition in wp-admin/includes/ms.php

Attachments (2)

47422.diff (5.6 KB ) - added by davidbaumwald 7 years ago.
Patch
47422.1.diff (3.6 KB ) - added by audrasjb 5 years ago.
Refreshes patch to handle loose comparisons

Download all attachments as: .zip

Change History (12)

@davidbaumwald
7 years ago

Patch

#1 @davidbaumwald
7 years ago

  • Keywords has-patch added

#2 @spacedmonkey
7 years ago

  • Component AdministrationNetworks and Sites
  • Milestone Awaiting ReviewFuture Release

#3 @SergeyBiryukov
5 years ago

  • Keywords needs-refresh added
  • Milestone Future Release5.8

Thanks for the patch!

It looks like some of these issues were resolved in [47219], [47808], and [47848], but there are still 13 loose comparisons in the file at the moment. A refresh would be helpful :)

This ticket was mentioned in Slack in #core by lukecarbis. View the logs.


5 years ago

#5 @davidbaumwald
5 years ago

  • Keywords good-first-bug added

#6 @desrosj
5 years ago

  • Milestone 5.8Future Release

This one still needs a refresh. With 5.8 feature freeze today, I'm going to punt to Future Release. When a contributor is able to refresh the patch, it can be moved back to a numbered milestone.

#7 @SergeyBiryukov
5 years ago

  • Milestone Future Release5.9

Moving to 5.9 just so that I don't forget about this ticket when working on other coding standard fixes :)

@audrasjb
5 years ago

Refreshes patch to handle loose comparisons

#8 @audrasjb
5 years ago

  • Keywords needs-refresh removed

@SergeyBiryukov patch refreshed against trunk and also to handle the remaining loose comparisons. I kept 3 of them as I'm not sure it's a good think to cast the remaining '0' strings to integers.

#9 @audrasjb
5 years ago

  • Keywords commit added

The previous patch still applies cleanly. Marking for commit consideration.

#10 @SergeyBiryukov
5 years ago

  • Owner set to SergeyBiryukov
  • Resolutionfixed
  • Status newclosed

In 52086:

Coding Standards: Use strict comparison in wp-admin/includes/ms.php.

Props davidbaumwald, audrasjb.
Fixes #47422.

Note: See TracTickets for help on using tickets.