diff --git a/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php b/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php index b76a3352c5..496a1520e0 100644 --- a/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php +++ b/src/Symfony/Component/VarDumper/Dumper/HtmlDumper.php @@ -46,6 +46,15 @@ class HtmlDumper extends CliDumper 'index' => 'color:#1299DA', ); + /** + * {@inheritdoc} + */ + public function __construct($output = null, $charset = null) + { + parent::__construct($output, $charset); + $this->dumpId = 'sf-dump-'.mt_rand(); + } + /** * {@inheritdoc} */ @@ -94,8 +103,8 @@ class HtmlDumper extends CliDumper */ public function dump(Data $data, $output = null) { - $this->dumpId = 'sf-dump-'.mt_rand(); parent::dump($data, $output); + $this->dumpId = 'sf-dump-'.mt_rand(); } /** @@ -342,7 +351,7 @@ EOHTML; $style .= sprintf(' title="%s%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : ''); } elseif ('note' === $style) { if (false !== $c = strrpos($v, '\\')) { - return sprintf('%s', $v, $style, substr($v, $c+1)); + return sprintf('%s', $v, $style, substr($v, $c + 1)); } elseif (':' === $v[0]) { return sprintf('%s', substr($v, 1), $style, $v); }