[wp-trac] [WordPress Trac] #65271: REST API Integer Type Check Fails on Large Ints
WordPress Trac
noreply at wordpress.org
Tue May 19 19:45:02 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:
------------------------------------------+-----------------------------
Comment (by westonruter):
I think it would perhaps be better to look at the string representation of
the number, and check to see if it has a decimal point present: `!
str_contains( (string) $maybe_integer, '.' )`. I haven't done any research
on alternatives, however.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/65271#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list