Skip to content

Commit

Permalink
Fixed cast as int. @moseslecce
Browse files Browse the repository at this point in the history
  • Loading branch information
stanislav-janu committed Apr 24, 2023
1 parent b76e4b8 commit 9b11636
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/SignedRequest.php
Expand Up @@ -96,7 +96,10 @@ public function get(string $key, mixed $default = null): mixed
*/
public function getUserId(): ?int
{
return $this->get('user_id');
$user_id = $this->get('user_id');
return $user_id === null
? null
: (int) $user_id;
}


Expand Down

0 comments on commit 9b11636

Please sign in to comment.