From 7b278da43a7eeade46c1abad1b9fd7acb17d390e Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Fri, 28 Feb 2025 11:20:28 -0600 Subject: [PATCH] Fix broken getter --- lib/Payment.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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{