mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Fix psalm
This commit is contained in:
parent
114d7124ae
commit
3973bd4a3b
1 changed files with 1 additions and 1 deletions
|
@ -347,7 +347,7 @@ class PayUponInvoice {
|
|||
}
|
||||
|
||||
$national_number = filter_input( INPUT_POST, 'billing_phone', FILTER_SANITIZE_STRING );
|
||||
if ( ! preg_match( '/^[0-9]{1,14}?$/', $national_number ) ) {
|
||||
if ( $national_number && ! preg_match( '/^[0-9]{1,14}?$/', $national_number ) ) {
|
||||
$errors->add( 'validation', __( 'Phone number size must be between 1 and 14', 'woocommerce-paypal-payments' ) );
|
||||
}
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue