Skip to content

Commit

Permalink
Fix warning deprecated: str_replace(): Passing null to parameter #2 (…
Browse files Browse the repository at this point in the history
…… (#1146)
  • Loading branch information
anton-kulyk committed Feb 7, 2024
1 parent dbad6a5 commit b9b9c59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ protected function getUserByToken($token)
protected function mapUserToObject(array $user)
{
return (new User())->setRaw($user)->map([
'id' => str_replace('https://www.paypal.com/webapps/auth/identity/user/', null, $user['user_id']),
'id' => str_replace('https://www.paypal.com/webapps/auth/identity/user/', '', $user['user_id']),
'nickname' => null,
'name' => $user['name'] ?? null,
'email' => collect($user['emails'] ?? [])->firstWhere('primary')['value'] ?? null,
Expand Down

0 comments on commit b9b9c59

Please sign in to comment.