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 []; } }