diff --git a/lib/Payment.php b/lib/Payment.php index c6d59145..911bef49 100644 --- a/lib/Payment.php +++ b/lib/Payment.php @@ -30,7 +30,11 @@ class Payment{ * @throws Exceptions\UserNotFoundException */ protected function GetUser(): ?User{ - return $this->_User ??= User::Get($this->UserId); + if(!isset($this->_User) && $this->UserId !== null){ + $this->_User = User::Get($this->UserId); + } + + return $this->_User; } protected function GetProcessorUrl(): string{