diff --git a/Debug/WrappedListener.php b/Debug/WrappedListener.php index 240d1d2..c8c6af8 100644 --- a/Debug/WrappedListener.php +++ b/Debug/WrappedListener.php @@ -48,7 +48,7 @@ public function __construct(callable|array $listener, ?string $name, Stopwatch $ $this->callableRef .= '::'.$listener[1]; } elseif ($listener instanceof \Closure) { $r = new \ReflectionFunction($listener); - if (str_contains($r->name, '{closure}')) { + if (str_contains($r->name, '{closure')) { $this->pretty = $this->name = 'closure'; } elseif ($class = $r->getClosureCalledClass()) { $this->name = $class->name;