Opened 5 years ago
Closed 5 years ago
#47573 closed enhancement (fixed)
Use strict comparison in wp-includes/taxonomy.php
Reported by: | andizer | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 5.3 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Taxonomy | Keywords: | has-patch |
Focuses: | coding-standards | Cc: |
Description
Improvement in doing comparisons in taxonomy.php:
Do strict comparison where possible.
Did two small readability improvements.
Attachments (1)
Change History (7)
#1
@
5 years ago
- Milestone changed from Awaiting Review to 5.3
- Owner set to SergeyBiryukov
- Status changed from new to reviewing
#4
@
5 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Hmm, for some reason the tests pass for me locally, but fail on Travis:
https://travis-ci.com/WordPress/wordpress-develop/builds/121609760
Note: See
TracTickets for help on using
tickets.
For some context, we have to be extra careful with this kind of changes, as these values are sometimes an integer and sometimes a numeric string, causing various inconsistencies. See #16101, #22324, #25092, #25852, #43752, #44723 for example.
I've double-checked 47573.diff and made some adjustments to ensure the correct types when comparing.