Make WordPress Core

Opened 5 years ago

Closed 2 years ago

#47422 closed enhancement (fixed)

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

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

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 5 years ago.
Patch
47422.1.diff (3.6 KB) - added by audrasjb 2 years ago.
Refreshes patch to handle loose comparisons

Download all attachments as: .zip

Change History (12)

@davidbaumwald
5 years ago

Patch

#1 @davidbaumwald
5 years ago

  • Keywords has-patch added

#2 @spacedmonkey
5 years ago

  • Component changed from Administration to Networks and Sites
  • Milestone changed from Awaiting Review to Future Release

#3 @SergeyBiryukov
3 years ago

  • Keywords needs-refresh added
  • Milestone changed from Future Release to 5.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.


3 years ago

#5 @davidbaumwald
3 years ago

  • Keywords good-first-bug added

#6 @desrosj
3 years ago

  • Milestone changed from 5.8 to Future 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
3 years ago

  • Milestone changed from Future Release to 5.9

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

@audrasjb
2 years ago

Refreshes patch to handle loose comparisons

#8 @audrasjb
2 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
2 years ago

  • Keywords commit added

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

#10 @SergeyBiryukov
2 years ago

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

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.