8000 bug #37921 [Yaml] account for is_numeric() behavior changes in PHP 8 … · symfony/symfony@4b3d5b6 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4b3d5b6

Browse files
committed
bug #37921 [Yaml] account for is_numeric() behavior changes in PHP 8 (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [Yaml] account for is_numeric() behavior changes in PHP 8 | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 05db8e0 account for is_numeric() behavior changes in PHP 8
2 parents 86310de + 05db8e0 commit 4b3d5b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Yaml/Inline.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public static function dump($value, $flags = 0)
210210
return 'false';
211211
case ctype_digit($value):
212212
return \is_string($value) ? "'$value'" : (int) $value;
213-
case is_numeric($value):
213+
case is_numeric($value) && false === strpos($value, "\n"):
214214
$locale = setlocale(LC_NUMERIC, 0);
215215
if (false !== $locale) {
216216
setlocale(LC_NUMERIC, 'C');

0 commit comments

Comments
 (0)
0