Skip to content

Commit 2605cf0

Browse files
[VarDumper] Move locale sniffing to dump() time
1 parent 30b409a commit 2605cf0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/Symfony/Component/VarDumper/Dumper/AbstractDumper.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function __construct($output = null, $charset = null, $flags = 0)
4444
{
4545
$this->flags = (int) $flags;
4646
$this->setCharset($charset ?: ini_get('php.output_encoding') ?: ini_get('default_charset') ?: 'UTF-8');
47-
$this->decimalPoint = (string) 0.5;
47+
$this->decimalPoint = strval(0.5);
4848
$this->decimalPoint = $this->decimalPoint[1];
4949
$this->setOutput($output ?: static::$defaultOutput);
5050
if (!$output && is_string(static::$defaultOutput)) {
@@ -121,6 +121,9 @@ public function setIndentPad($pad)
121121
*/
122122
public function dump(Data $data, $output = null)
123123
{
124+
$this->decimalPoint = strval(0.5);
125+
$this->decimalPoint = $this->decimalPoint[1];
126+
124127
if ($returnDump = true === $output) {
125128
$output = fopen('php://memory', 'r+b');
126129
}

0 commit comments

Comments
 (0)