[wp-trac] [WordPress Trac] #55667: Tests_Basic::test_security_md() truncates the `.0` for `x.1` current version releases.
WordPress Trac
noreply at wordpress.org
Tue May 3 18:25:17 UTC 2022
#55667: Tests_Basic::test_security_md() truncates the `.0` for `x.1` current
version releases.
------------------------------+-------------------------
Reporter: hellofromTonya | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: 6.1
Component: Build/Test Tools | Version: 5.4
Severity: normal | Keywords: needs-patch
Focuses: |
------------------------------+-------------------------
Discovered when branching 6.0, the `Tests_Basic::test_security_md()` code
introduced in [47403] removes the `.0` in calcuating the latest stable
version number:
{{{#!php
$latest_stable = sprintf( '%s.x', (float) $current_version - 0.1 );
}}}
When `$current_version` is say `6.1`, after running through the `(float)`
type conversion and subtracting `0.1`, the resultant is `6` rather than
`6.0`. This causes the test to fail.
As a temporary workaround, the assertion was disabled in [53346]. Once
fixed, this change can be reverted.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55667>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list