Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f6e0da

Browse files
[VarDumper] Move locale sniffing to dump() time
1 parent910a8de commit7f6e0da

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
3939
publicfunction__construct($output =null,$charset =null)
4040
{
4141
$this->setCharset($charset ?:ini_get('php.output_encoding') ?:ini_get('default_charset') ?:'UTF-8');
42-
$this->decimalPoint =(string)0.5;
43-
$this->decimalPoint =$this->decimalPoint[1];
42+
$this->decimalPoint =localeconv();
43+
$this->decimalPoint =$this->decimalPoint['decimal_point'];
4444
$this->setOutput($output ?:static::$defaultOutput);
4545
if (!$output &&is_string(static::$defaultOutput)) {
4646
static::$defaultOutput =$this->outputStream;
@@ -134,6 +134,9 @@ public function setIndentPad($pad)
134134
*/
135135
publicfunctiondump(Data$data,$output =null)
136136
{
137+
$this->decimalPoint =localeconv();
138+
$this->decimalPoint =$this->decimalPoint['decimal_point'];
139+
137140
$exception =null;
138141
if ($output) {
139142
$prevOutput =$this->setOutput($output);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp