Fixed
Details
Details
Assignee
Pothys - MitrahSoft
Pothys - MitrahSoftReporter
Paul Klinkenberg
Paul KlinkenbergPriority
Labels
New Issue warning screen
Before you create a new Issue, please post to the mailing list first https://dev.lucee.org
Once the issue has been verified, one of the Lucee team will ask you to file an issue
Sprint
None
Affects versions
Created 10 February 2021 at 09:07
Updated 29 July 2023 at 07:01
Resolved 8 March 2021 at 09:56
The change done for tickets https://luceeserver.atlassian.net/browse/LDEV-2747#icft=LDEV-2747 and LDEV-2353, which is already deployed as a RC in 5.3.8.47, introduces a new bug for `isNumeric()`.
When the string to test ends with a “d” or an “f” (a java type qualifier for Double / Float), `isNumeric()` will now return true.
Before this change, it returned False (tested with trycf.com on 5.3.7 and 4.5, and ACF 2021)
Code to test:
<cfoutput> <cfset tests = ['35e3f', '6f', '6.6f', '2d', '3.3d', '6.62607004e-34', '12E4d', '123456789L', '123456789l']> <cfloop array="#tests#" index="i"> isNumeric('#i#') = #isNumeric(i)#<br> </cfloop> </cfoutput>
Output on Lucee 5.3.8.139-RC:
isNumeric('35e3f') = true isNumeric('6f') = true isNumeric('6.6f') = true isNumeric('2d') = true isNumeric('3.3d') = true isNumeric('6.62607004e-34') = true isNumeric('12E4d') = true isNumeric('123456789L') = false isNumeric('123456789l') = false