Skip to content

Commit d41a04e

Browse files
committed
Fix CS
1 parent 2a80127 commit d41a04e

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/Gateway/GatewayModule.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,8 @@ public function addPaymentMethodMandatoryFieldsPhoneVerification(
519519
$fields['billing_phone'] = null;
520520
return $fields;
521521
}
522-
$fieldPosted = !empty($_POST[$field]) ? sanitize_text_field($_POST[$field]) : false;
522+
// phpcs:ignore WordPress.Security.NonceVerification.Missing
523+
$fieldPosted = !empty($_POST[$field]) ? sanitize_text_field(wp_unslash($_POST[$field])) : false;
523524

524525
if ($fieldPosted && $this->isPhoneValid($fieldPosted)) {
525526
$fields['billing_phone'] = $fieldPosted;

src/SDK/Api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function isMollieFraudException(ApiException $e): bool
107107
public function isUnprocessablePhoneException(ApiException $e): bool
108108
{
109109
$isUnprocessablePhoneCode = $e->getCode() === 422;
110-
$isUnprocessablePhoneMessage = strpos($e->getMessage(), 'phone number is invalid')!== false;
110+
$isUnprocessablePhoneMessage = strpos($e->getMessage(), 'phone number is invalid') !== false;
111111

112112
if ($isUnprocessablePhoneCode && $isUnprocessablePhoneMessage) {
113113
return true;

0 commit comments

Comments
 (0)