From 8cec8de12bab28db3b0f1537c92914b25e5ebd03 Mon Sep 17 00:00:00 2001 From: Gabriel Carvalho Date: Mon, 6 Oct 2025 12:38:41 -0300 Subject: [PATCH] fix: ensure uri_mask is returned correctly from configuration --- src/Middleware/TraceMiddleware.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Middleware/TraceMiddleware.php b/src/Middleware/TraceMiddleware.php index e586757..bd44c80 100644 --- a/src/Middleware/TraceMiddleware.php +++ b/src/Middleware/TraceMiddleware.php @@ -170,6 +170,13 @@ protected function getPath(ServerRequestInterface $request): string protected function getUriMask(): array { - return is_array($this->config['uri_mask'])? $this->config['uri_mask'] : []; + if( + array_key_exists('uri_mask', $this->config) && + is_array($this->config['uri_mask']) + ) { + return $this->config['uri_mask']; + } + + return []; } }