[Config] fixed an edge case
This commit is contained in:
parent
4e45067c8e
commit
e587fa8a85
@ -104,6 +104,7 @@ class XmlUtilsTest extends \PHPUnit_Framework_TestCase
|
||||
public function getDataForPhpize()
|
||||
{
|
||||
return array(
|
||||
array('', ''),
|
||||
array(null, 'null'),
|
||||
array(true, 'true'),
|
||||
array(false, 'false'),
|
||||
|
@ -187,7 +187,7 @@ class XmlUtils
|
||||
$cast = intval($value);
|
||||
|
||||
return '0' == $value[0] ? octdec($value) : (((string) $raw == (string) $cast) ? $cast : $raw);
|
||||
case '-' === $value[0] && ctype_digit(substr($value, 1)):
|
||||
case isset($value[1]) && '-' === $value[0] && ctype_digit(substr($value, 1)):
|
||||
$raw = $value;
|
||||
$cast = intval($value);
|
||||
|
||||
|
Reference in New Issue
Block a user