Skip to content

Commit

Permalink
FIx null return (#1010)
Browse files Browse the repository at this point in the history
`Request::header` could possibly return null. Fix by adding default empty string return.
  • Loading branch information
phknot authored and erikn69 committed Feb 21, 2025
1 parent 627a7b7 commit 4f72181
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Resolvers/UserAgentResolver.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ class UserAgentResolver implements Resolver
{
public static function resolve(Auditable $auditable): string
{
return $auditable->preloadedResolverData['user_agent'] ?? Request::header('User-Agent');
return $auditable->preloadedResolverData['user_agent'] ?? Request::header('User-Agent', '');
}
}

0 comments on commit 4f72181

Please sign in to comment.