Skip to content

Commit

Permalink
Fix "should return bool but returns int|false.".
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed Jan 23, 2024
1 parent 2ae69d5 commit 3e5bdfc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/ReturnController.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,9 @@ public function rest_api_adyen_redirect_permission( WP_REST_Request $request ) {
return false;
}

return \wp_verify_nonce( $nonce, 'pronamic-pay-adyen-payment-redirect-' . $payment_id );
$result = \wp_verify_nonce( $nonce, 'pronamic-pay-adyen-payment-redirect-' . $payment_id );

return ( false !== $result );
}

/**
Expand Down Expand Up @@ -350,7 +352,9 @@ public function rest_api_adyen_error_permission( WP_REST_Request $request ) {
return false;
}

return \wp_verify_nonce( $nonce, 'pronamic-pay-adyen-payment-error-' . $payment_id );
$result = \wp_verify_nonce( $nonce, 'pronamic-pay-adyen-payment-error-' . $payment_id );

return ( false !== $result );
}

/**
Expand Down

0 comments on commit 3e5bdfc

Please sign in to comment.