Skip to content

Commit

Permalink
[DependencyInjection] fixed int casting for XML files (based on what …
Browse files Browse the repository at this point in the history
…is done in the YAML component)
  • Loading branch information
fabpot committed Oct 25, 2011
1 parent bc330d4 commit 8dcde3c
Showing 1 changed file with 4 additions and 1 deletion.
Expand Up @@ -106,7 +106,10 @@ static public function phpize($value)
case 'null' === $lowercaseValue:
return null;
case ctype_digit($value):
return '0' == $value[0] ? octdec($value) : intval($value);
$raw = $value;
$cast = intval($value);

return '0' == $value[0] ? octdec($value) : (((string) $raw == (string) $cast) ? $cast : $raw);
case 'true' === $lowercaseValue:
return true;
case 'false' === $lowercaseValue:
Expand Down

0 comments on commit 8dcde3c

Please sign in to comment.