Skip to content

Commit

Permalink
bug #25662 Dumper shouldn't use html format for phpdbg / cli-server (…
Browse files Browse the repository at this point in the history
…jhoff)

This PR was submitted for the 3.3 branch but it was merged into the 2.7 branch instead (closes #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
  • Loading branch information
nicolas-grekas committed Jan 3, 2018
2 parents d975ad6 + e2b6091 commit 8e54591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Symfony/Component/VarDumper/VarDumper.php
Expand Up @@ -29,7 +29,7 @@ public static function dump($var)
{
if (null === self::$handler) {
$cloner = new VarCloner();
$dumper = 'cli' === PHP_SAPI ? new CliDumper() : new HtmlDumper();
$dumper = in_array(PHP_SAPI, array('cli', 'phpdbg')) ? new CliDumper() : new HtmlDumper();
self::$handler = function ($var) use ($cloner, $dumper) {
$dumper->dump($cloner->cloneVar($var));
};
Expand Down

0 comments on commit 8e54591

Please sign in to comment.