1
0
mirror of https://github.com/Seldaek/monolog.git synced 2025-10-21 16:46:11 +02:00

Replace call_user_func

This commit is contained in:
Mponos George
2020-07-08 23:02:57 +03:00
parent 53e2c97b0b
commit a54cd1f178
8 changed files with 10 additions and 10 deletions

View File

@@ -86,7 +86,7 @@ class SamplingHandler extends AbstractHandler implements ProcessableHandlerInter
public function getHandler(array $record = null)
{
if (!$this->handler instanceof HandlerInterface) {
$this->handler = call_user_func($this->handler, $record, $this);
$this->handler = ($this->handler)($record, $this);
if (!$this->handler instanceof HandlerInterface) {
throw new \RuntimeException("The factory callable should return a HandlerInterface");
}