Skip to content

Commit

Permalink
Merge pull request #11 from stickeeuk/fix/deprecation-notice
Browse files Browse the repository at this point in the history
Fix deprecation notice in str_starts_with
  • Loading branch information
plunkettscott authored Aug 19, 2023
2 parents f63e0e1 + 7df374a commit 7888d04
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 7888d04

Please sign in to comment.