[VarDumper] Use "C" locale when using "comma" flags
This commit is contained in:
parent
0bd1f09152
commit
305ae5e5d4
@ -123,6 +123,10 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
|
|||||||
*/
|
*/
|
||||||
public function dump(Data $data, $output = null)
|
public function dump(Data $data, $output = null)
|
||||||
{
|
{
|
||||||
|
if ($locale = $this->flags & (self::DUMP_COMMA_SEPARATOR | self::DUMP_TRAILING_COMMA) ? setlocale(LC_NUMERIC, 0) : null) {
|
||||||
|
setlocale(LC_NUMERIC, 'C');
|
||||||
|
}
|
||||||
|
|
||||||
if ($returnDump = true === $output) {
|
if ($returnDump = true === $output) {
|
||||||
$output = fopen('php://memory', 'r+b');
|
$output = fopen('php://memory', 'r+b');
|
||||||
}
|
}
|
||||||
@ -143,6 +147,9 @@ abstract class AbstractDumper implements DataDumperInterface, DumperInterface
|
|||||||
if ($output) {
|
if ($output) {
|
||||||
$this->setOutput($prevOutput);
|
$this->setOutput($prevOutput);
|
||||||
}
|
}
|
||||||
|
if ($locale) {
|
||||||
|
setlocale(LC_NUMERIC, $locale);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user