From a456dda62dcf20ec93774e42c1cd89136e391029 Mon Sep 17 00:00:00 2001 From: netkas Date: Tue, 11 Feb 2025 13:16:23 -0500 Subject: [PATCH] Improved exception handling --- .../Verification/VerificationAnswerImageCaptcha.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Socialbox/Classes/StandardMethods/Verification/VerificationAnswerImageCaptcha.php b/src/Socialbox/Classes/StandardMethods/Verification/VerificationAnswerImageCaptcha.php index cc840c4..c6a835b 100644 --- a/src/Socialbox/Classes/StandardMethods/Verification/VerificationAnswerImageCaptcha.php +++ b/src/Socialbox/Classes/StandardMethods/Verification/VerificationAnswerImageCaptcha.php @@ -27,10 +27,9 @@ throw new MissingRpcArgumentException('answer'); } - $session = $request->getSession(); - try { + $session = $request->getSession(); if(CaptchaManager::getCaptcha($session->getPeerUuid())?->isExpired()) { return $rpcRequest->produceError(StandardError::EXPIRED, 'The captcha has expired');