Skip to content

Commit

Permalink
check if string or numeric
Browse files Browse the repository at this point in the history
  • Loading branch information
izsi-salmon committed Aug 16, 2022
1 parent bee7a3c commit 7744eff
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Raygun4php/RaygunClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public function SetUser(
$isAnonymousCookie = $this->StoreOrRetrieveUserCookie('rgisanonymous', $isAnonymous ? 'true' : 'false');
$this->isAnonymous = ($isAnonymousCookie === 'true');

if (isset($user) && !$isAnonymous) {
if ((is_string($user) || is_numeric($user)) && !$isAnonymous) {
$this->user = $user;
$this->firstName = $this->StoreOrRetrieveUserCookie('rgfirstname', $firstName);
$this->fullName = $this->StoreOrRetrieveUserCookie('rgfullname', $fullName);
Expand Down

0 comments on commit 7744eff

Please sign in to comment.