[wp-trac] [WordPress Trac] #46599: Replace compatibility tests with new functions
WordPress Trac
noreply at wordpress.org
Fri Mar 22 12:38:18 UTC 2019
#46599: Replace compatibility tests with new functions
------------------------------------------------+--------------------------
Reporter: afragen | Owner:
| SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.2
Component: Plugins | Version:
Severity: normal | Resolution:
Keywords: servehappy has-patch needs-testing | Focuses:
------------------------------------------------+--------------------------
Comment (by SergeyBiryukov):
We should keep the `empty()` checks, as plugin API requests can be
overridden, and the responses may not contain the `requires` or
`requires_php` field, triggering PHP notices. See #31694, #33330, or
#44582 for an example of similar notices.
[attachment:"46599.2.diff"] is a patch with `empty()` checks. However, at
this point, the new functions just become an alias for `version_compare()`
and don't offer any significant benefit or code reduction.
The naming of `wp_is_wp_compatible()` and `wp_is_php_compatible()` (as
suggested in comment:41:ticket:43992) also sounds a bit weird.
I'd think we should pull them for now, and discuss better naming and
whether we actually need them.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46599#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list