Skip to content

Commit

Permalink
Merge pull request #7490 from bolt/hotfix/dont-break-userid-null
Browse files Browse the repository at this point in the history
Don't break if UserId is `null`
  • Loading branch information
GwendolenLynch committed May 19, 2018
2 parents 3d32213 + 185cf18 commit a50f17e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Users.php
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public function getUser($userId)
$this->getUsers();

// In most cases by far, we'll request an ID, and we can return it here.
if (array_key_exists($userId, $this->users)) {
if ($userId && array_key_exists($userId, $this->users)) {
return $this->users[$userId];
}

Expand Down

0 comments on commit a50f17e

Please sign in to comment.