8000 [Config] fixed an edge case · symfony/symfony@e587fa8 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit e587fa8

Browse files
committed
[Config] fixed an edge case
1 parent 4e45067 commit e587fa8

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Symfony/Component/Config/Tests/Util/XmlUtilsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ public function testPhpize($expected, $value)
104104
public function getDataForPhpize()
105105
{
106106
return array(
107+
array('', ''),
107108
array(null, 'null'),
108109
array(true, 'true'),
109110
array(false, 'false'),

src/Symfony/Component/Config/Util/XmlUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ public static function phpize($value)
187187
$cast = intval($value);
188188

189189
return '0' == $value[0] ? octdec($value) : (((string) $raw == (string) $cast) ? $cast : $raw);
190-
case '-' === $value[0] && ctype_digit(substr($value, 1)):
190+
case isset($value[1]) && '-' === $value[0] && ctype_digit(substr($value, 1)):
191191
$raw = $value;
192192
$cast = intval($value);
193193

0 commit comments

Comments
 (0)
0