Skip to content

Commit d409737

Browse files
authored
Fix PHP 8.4 deprecation warning (#213)
1 parent e9ff300 commit d409737

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Recorders/DumpRecorder/MultiDumpHandler.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ public function dump(mixed $value): void
1616
}
1717
}
1818

19-
public function addHandler(callable $callable = null): self
19+
public function addHandler(?callable $callable = null): self
2020
{
21-
$this->handlers[] = $callable;
21+
if ($callable) {
22+
$this->handlers[] = $callable;
23+
}
2224

2325
return $this;
2426
}

0 commit comments

Comments
 (0)