diff --git a/src/Recorders/DumpRecorder/MultiDumpHandler.php b/src/Recorders/DumpRecorder/MultiDumpHandler.php index 9bf72f0..4ddea17 100644 --- a/src/Recorders/DumpRecorder/MultiDumpHandler.php +++ b/src/Recorders/DumpRecorder/MultiDumpHandler.php @@ -16,9 +16,11 @@ public function dump(mixed $value): void } } - public function addHandler(callable $callable = null): self + public function addHandler(?callable $callable = null): self { - $this->handlers[] = $callable; + if ($callable) { + $this->handlers[] = $callable; + } return $this; }