1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-16 21:08:34 +01:00

Fix vardumper #474 (#475)

This commit is contained in:
Barry vd. Heuvel 2021-07-27 07:47:57 +02:00 committed by GitHub
parent 678a54a502
commit 4ef8e359d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -285,7 +285,7 @@ class DebugBarVarDumper implements AssetProvider
*/
public function getAssets() {
$dumper = $this->getDumper();
$dumper->setDumpHeader(null); // this will cause the default dump header to regenerate
$dumper->resetDumpHeader(); // this will cause the default dump header to regenerate
return array(
'inline_head' => array(
'html_var_dumper' => $dumper->getDumpHeaderByDebugBar(),

View File

@ -10,6 +10,14 @@ use Symfony\Component\VarDumper\Dumper\HtmlDumper;
*/
class DebugBarHtmlDumper extends HtmlDumper
{
/**
* Resets an HTML header.
*/
public function resetDumpHeader()
{
$this->dumpHeader = null;
}
public function getDumpHeaderByDebugBar() {
// getDumpHeader is protected:
return str_replace('pre.sf-dump', '.phpdebugbar pre.sf-dump', $this->getDumpHeader());