From 7df374a003be3714866f5ea66b38498449ca20d8 Mon Sep 17 00:00:00 2001 From: RoBorg Date: Fri, 4 Aug 2023 10:37:28 +0100 Subject: [PATCH] Fix deprecation notice in str_starts_with --- src/Concerns/TracesHttpRequests.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Concerns/TracesHttpRequests.php b/src/Concerns/TracesHttpRequests.php index fe38437..237c9ee 100644 --- a/src/Concerns/TracesHttpRequests.php +++ b/src/Concerns/TracesHttpRequests.php @@ -148,7 +148,7 @@ private function calculateSpanName(Request $request): string // includes the name of the route, if it has one. $routeName = $route->getName(); - if (Str::startsWith($routeName, 'generated::')) { + if (($routeName !== null) && Str::startsWith($routeName, 'generated::')) { // This is a route name generated by for a closure when caching // routes. We don't want to include these in the trace, so we'll // just set the name to null and default to the route path.