Skip to content

Commit fa61dfb

Browse files
Merge branch '5.4' into 6.0
* 5.4: [DependencyInjection] Properly declare #[When] as allowed on functions [VarDumper] Fix dumping floats on PHP8 Fix dumping enums on PHP 8.2 [Cache] Prevent fatal errors on php 8 when running concurrently with TagAwareAdapter v6.1
2 parents 011f19d + cdcadd3 commit fa61dfb

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

Dumper/AbstractDumper.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
3131
protected $line = '';
3232
protected $lineDumper;
3333
protected $outputStream;
34-
protected $decimalPoint; // This is locale dependent
34+
protected $decimalPoint = '.';
3535
protected $indentPad = ' ';
3636
protected $flags;
3737

@@ -46,8 +46,6 @@ public function __construct($output = null, string $charset = null, int $flags =
4646
{
4747
$this->flags = $flags;
4848
$this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8');
49-
$this->decimalPoint = localeconv();
50-
$this->decimalPoint = $this->decimalPoint['decimal_point'];
5149
$this->setOutput($output ?: static::$defaultOutput);
5250
if (!$output && \is_string(static::$defaultOutput)) {
5351
static::$defaultOutput = $this->outputStream;
@@ -120,9 +118,6 @@ public function setIndentPad(string $pad): string
120118
*/
121119
public function dump(Data $data, $output = null): ?string
122120
{
123-
$this->decimalPoint = localeconv();
124-
$this->decimalPoint = $this->decimalPoint['decimal_point'];
125-
126121
if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(\LC_NUMERIC, 0) : null) {
127122
setlocale(\LC_NUMERIC, 'C');
128123
}

0 commit comments

Comments
 (0)