[wp-trac] [WordPress Trac] #65271: REST API Integer Type Check Fails on Large Ints
WordPress Trac
noreply at wordpress.org
Tue May 19 17:24:32 UTC 2026
#65271: REST API Integer Type Check Fails on Large Ints
------------------------------------------+-----------------------------
Reporter: kevinfodness | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: REST API | Version: trunk
Severity: minor | Resolution:
Keywords: needs-patch needs-unit-tests | Focuses:
------------------------------------------+-----------------------------
Changes (by westonruter):
* keywords: => needs-patch needs-unit-tests
* milestone: Awaiting Review => Future Release
Comment:
Good catch. It also seems unsafe in general to compare for exact equality
with floats like `round( (float) $maybe_integer ) === (float)
$maybe_integer` given the impreciseness of floating point arithmetic
(although no arithmetic is being done here).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65271#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list