Skip to content

Commit

Permalink
Fix deprecation notice in str_starts_with
Browse files Browse the repository at this point in the history
  • Loading branch information
RoBorg committed Aug 4, 2023
1 parent f63e0e1 commit 7df374a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Concerns/TracesHttpRequests.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 7df374a

Please sign in to comment.