Skip to content
Snippets Groups Projects
Commit 97bc61c0 authored by Dell Sala's avatar Dell Sala
Browse files

Fixes issue #3620. Change to the Spyc library to correctly convert hex strings to ints.

parent c0ab9679
Branches
Tags
No related merge requests found
......@@ -615,10 +615,12 @@ class Spyc {
return false;
}
if (is_string($value) && preg_match('/^0x[0-9a-fA-F]+$/', $value)) {
return hexdec($value);
}
if (is_numeric($value)) {
if ($value === '0') return 0;
if (stripos($value, '0x') === 0)
$value = hexdec($value);
if (rtrim ($value, 0) === $value)
$value = (float)$value;
return $value;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment