[Config] fixed an edge case

This commit is contained in:
Fabien Potencier 2013-08-13 15:40:07 +02:00
parent 4e45067c8e
commit e587fa8a85
2 changed files with 2 additions and 1 deletions

View File

@ -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'),

View File

@ -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);