[VarDumper] Fix uninitialized id in HtmlDumper
This commit is contained in:
parent
da662497f0
commit
00eee72f0e
@ -46,6 +46,15 @@ class HtmlDumper extends CliDumper
|
|||||||
'index' => 'color:#1299DA',
|
'index' => 'color:#1299DA',
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function __construct($output = null, $charset = null)
|
||||||
|
{
|
||||||
|
parent::__construct($output, $charset);
|
||||||
|
$this->dumpId = 'sf-dump-'.mt_rand();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
@ -94,8 +103,8 @@ class HtmlDumper extends CliDumper
|
|||||||
*/
|
*/
|
||||||
public function dump(Data $data, $output = null)
|
public function dump(Data $data, $output = null)
|
||||||
{
|
{
|
||||||
$this->dumpId = 'sf-dump-'.mt_rand();
|
|
||||||
parent::dump($data, $output);
|
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' : '');
|
$style .= sprintf(' title="%s%s characters"', $attr['length'], $attr['binary'] ? ' binary or non-UTF-8' : '');
|
||||||
} elseif ('note' === $style) {
|
} elseif ('note' === $style) {
|
||||||
if (false !== $c = strrpos($v, '\\')) {
|
if (false !== $c = strrpos($v, '\\')) {
|
||||||
return sprintf('<abbr title="%s" class=sf-dump-%s>%s</abbr>', $v, $style, substr($v, $c+1));
|
return sprintf('<abbr title="%s" class=sf-dump-%s>%s</abbr>', $v, $style, substr($v, $c + 1));
|
||||||
} elseif (':' === $v[0]) {
|
} elseif (':' === $v[0]) {
|
||||||
return sprintf('<abbr title="`%s` resource" class=sf-dump-%s>%s</abbr>', substr($v, 1), $style, $v);
|
return sprintf('<abbr title="`%s` resource" class=sf-dump-%s>%s</abbr>', substr($v, 1), $style, $v);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user