← All changes
|
src/Framework/PaymentGateways/Traits/HandleHttpResponses.php
+2
-1
4.15.1
→
4.17.0
View file →
| @@ -45,8 +45,9 @@ | ||
| 45 | 45 | * Handle response on basis of request mode when exception occurs: |
| 46 | 46 | * 1. Redirect to donation form if donation form submit. |
| 47 | 47 | * 2. Return json response if processing payment on ajax. |
| 48 | 48 | * |
| 49 | + * @since 4.17.0 Declare the nullable parameter explicitly. | |
| 49 | 50 | * @since 3.0.0 Update response with type and WP_Error errors. |
| 50 | 51 | * @since 2.21.0 Handle PHP exception. |
| 51 | 52 | * @since 2.19.0 |
| 52 | 53 | */ |
| @@ -53,9 +54,9 @@ | ||
| 53 | 54 | public function handleExceptionResponse( |
| 54 | 55 | Exception $exception, |
| 55 | 56 | string $message, |
| 56 | 57 | string $type = DonationFormErrorTypes::UNKNOWN, |
| 57 | - WP_Error $errors = null | |
| 58 | + ?WP_Error $errors = null | |
| 58 | 59 | ) { |
| 59 | 60 | if ($exception instanceof PaymentGatewayException) { |
| 60 | 61 | $message = $exception->getMessage(); |
| 61 | 62 | $type = DonationFormErrorTypes::GATEWAY; |