8000 bug #25662 Dumper shouldn't use html format for phpdbg / cli-server (… · sroze/symfony@8e54591 · GitHub
[go: up one dir, main page]

Skip to content

Commit 8e54591

Browse files
bug symfony#25662 Dumper shouldn't use html format for phpdbg / cli-server (jhoff)
This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes symfony#25662). Discussion ---------- Dumper shouldn't use html format for phpdbg / cli-server | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a This may not be the lowest branch that this fix applies to. Prevents the dumper from outputting in html format when using phpdbg. Commits ------- e2b6091 Dumper shouldn't use html format for phpdbg
2 parents d975ad6 + e2b6091 commit 8e54591

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/VarDumper/VarDumper.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static function dump($var)
2929
{
3030
if (null === self::$handler) {
3131
$cloner = new VarCloner();
32-
$dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper();
32+
$dumper = in_array(PHP_SAPI, array('cli', 'phpdbg')) ? new CliDumper() : new HtmlDumper();
3333
self::$handler = function ($var) use ($cloner, $dumper) {
3434
$dumper->dump($cloner->cloneVar($var));
3535
};

0 commit comments

Comments
 (0)
0