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
-------
05db8e0fef
account for is_numeric() behavior changes in PHP 8
This commit is contained in:
commit
4b3d5b6c00
@ -210,7 +210,7 @@ class Inline
|
||||
return 'false';
|
||||
case ctype_digit($value):
|
||||
return \is_string($value) ? "'$value'" : (int) $value;
|
||||
case is_numeric($value):
|
||||
case is_numeric($value) && false === strpos($value, "\n"):
|
||||
$locale = setlocale(LC_NUMERIC, 0);
|
||||
if (false !== $locale) {
|
||||
setlocale(LC_NUMERIC, 'C');
|
||||
|
Reference in New Issue
Block a user