[wp-trac] [WordPress Trac] #59448: is_wp_version_compatible works unreliably
WordPress Trac
noreply at wordpress.org
Fri Nov 3 17:47:11 UTC 2023
#59448: is_wp_version_compatible works unreliably
----------------------------------------+-----------------------------
Reporter: kkmuffme | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Upgrade/Install | Version: 5.2
Severity: minor | Resolution:
Keywords: needs-patch good-first-bug | Focuses:
----------------------------------------+-----------------------------
Changes (by jorbin):
* keywords: => needs-patch good-first-bug
* version: trunk => 5.2
* milestone: Awaiting Review => Future Release
Comment:
`is_wp_version_compatible` was introduced in 5.2, so adjusting the
version.
As @afragen noted, `6.3.0` isn't a valid release. So the question becomes
what should happen if you pass in an invalid version. I think what's best
here is to assume that someone means `6.3` in this example.
I think the path forward for this is to maybe throw a `doing_it_wrong` or
`wp_trigger_error` if you pass in `x.y.0` and strip off the .0 so that
`version_compare` works correctly.
The patch for this should also include tests
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59448#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list