Skip to content

Commit 7d3b28f

Browse files
authored
Fix capture_dumps option on laravel dd(); (#1762)
1 parent 008dfe9 commit 7d3b28f

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/LaravelDebugbar.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,12 @@ public function boot()
189189
$this['messages']->collectFileTrace(true);
190190
}
191191

192-
if ($config->get('debugbar.options.messages.capture_dumps', false)) {
193-
\Symfony\Component\VarDumper\VarDumper::setHandler(function ($var) {
192+
if ($config->get('debugbar.options.messages.capture_dumps', true)) {
193+
$originalHandler = \Symfony\Component\VarDumper\VarDumper::setHandler(function ($var) use (&$originalHandler) {
194+
if ($originalHandler) {
195+
$originalHandler($var);
196+
}
197+
194198
self::addMessage($var);
195199
});
196200
}

0 commit comments

Comments
 (0)