Skip to content

Commit 7888d04

Browse files
Merge pull request #11 from stickeeuk/fix/deprecation-notice
Fix deprecation notice in str_starts_with
2 parents f63e0e1 + 7df374a commit 7888d04

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Concerns/TracesHttpRequests.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ private function calculateSpanName(Request $request): string
148148
// includes the name of the route, if it has one.
149149
$routeName = $route->getName();
150150

151-
if (Str::startsWith($routeName, 'generated::')) {
151+
if (($routeName !== null) && Str::startsWith($routeName, 'generated::')) {
152152
// This is a route name generated by for a closure when caching
153153
// routes. We don't want to include these in the trace, so we'll
154154
// just set the name to null and default to the route path.

0 commit comments

Comments
 (0)