From: Tim Düsterhus Date: Wed, 27 Oct 2021 09:16:11 +0000 (+0200) Subject: Stop using SystemException in PaypalCallbackAction X-Git-Tag: 5.5.0_Alpha_1~345^2^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=3fabf20425bc58061ea8c5580bdf1aebf42330c9;p=GitHub%2FWoltLab%2FWCF.git Stop using SystemException in PaypalCallbackAction --- diff --git a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php index 8080d8f2d4..f972bc5ea4 100644 --- a/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php +++ b/wcfsetup/install/files/lib/action/PaypalCallbackAction.class.php @@ -6,7 +6,6 @@ use GuzzleHttp\Psr7\Request; use Laminas\Diactoros\Response\EmptyResponse; use Psr\Http\Client\ClientExceptionInterface; use wcf\data\object\type\ObjectTypeCache; -use wcf\system\exception\SystemException; use wcf\system\io\HttpFactory; use wcf\system\payment\type\IPaymentType; use wcf\util\StringUtil; @@ -77,21 +76,21 @@ class PaypalCallbackAction extends AbstractAction $exceptionMessage .= " and business ('" . $_POST['business'] . "')"; } $exceptionMessage .= ", expected '" . PAYPAL_EMAIL_ADDRESS . "'."; - throw new SystemException($exceptionMessage); + throw new \Exception($exceptionMessage); } // get token if (!isset($_POST['custom'])) { - throw new SystemException('invalid custom item'); + throw new \Exception('invalid custom item'); } $tokenParts = \explode(':', $_POST['custom'], 2); if (\count($tokenParts) != 2) { - throw new SystemException('invalid custom item'); + throw new \Exception('invalid custom item'); } // get payment type object type $objectType = ObjectTypeCache::getInstance()->getObjectType(\intval($tokenParts[0])); if ($objectType === null || !($objectType->getProcessor() instanceof IPaymentType)) { - throw new SystemException('invalid payment type id'); + throw new \Exception('invalid payment type id'); } $processor = $objectType->getProcessor();