Bug #8824
closedis_numeric() on PHP 7 no longer validates hexadecimal values
100%
Description
http://php.net/manual/en/function.is-numeric.php
7.0.0 Strings in hexadecimal (e.g. 0xf4c3b00c) notation are no longer regarded as numeric strings, i.e. is_numeric() returns FALSE now.
Best fix appears to be using http://php.net/manual/en/function.ctype-xdigit.php without prepending 0x to the string.
The only uses of this for hexadecimal that I can find is interfaces.php
and handling of the track6 prefix ID, but worth checking for other instances.
Updated by Jim Pingle over 6 years ago
- Status changed from 13 to Feedback
interfaces.php is fixed in b6f6210a220bb206fd22ac34b306f007afedb01f -- I can now set a prefix ID of 0, 1, D, etc and they all work as expected (save interface prefix ID, apply, edit/save/apply on tracked interface WAN, then the new subnet is there)
Checked through uses of is_numeric()
in base and packages and didn't see any other instances of this.
Updated by Jim Pingle over 6 years ago
- Assignee set to Jim Pingle
- % Done changed from 0 to 100
Updated by Anonymous about 6 years ago
- Status changed from Feedback to Resolved
Tested on: 2.4.4-DEVELOPMENT (amd64)
built on Tue Aug 28 08:43:43 EDT 2018
FreeBSD 11.2-RELEASE-p2
Haven't seen any errors in interfaces when using hex numbers.
Setting as resolved.