Check if $_POST['store_state'] is set before using it

Fixes #20684
This commit is contained in:
Rodrigo Primo 2018-07-03 09:48:35 -03:00
parent a106b324bf
commit 7cdcae5bff
1 changed files with 1 additions and 1 deletions

View File

@ -515,7 +515,7 @@ class WC_Admin_Setup_Wizard {
$address_2 = sanitize_text_field( $_POST['store_address_2'] );
$city = sanitize_text_field( $_POST['store_city'] );
$country = sanitize_text_field( $_POST['store_country'] );
$state = sanitize_text_field( $_POST['store_state'] );
$state = isset( $_POST['store_state'] ) ? sanitize_text_field( $_POST['store_state'] ) : false;
$postcode = sanitize_text_field( $_POST['store_postcode'] );
$currency_code = sanitize_text_field( $_POST['currency_code'] );
$product_type = sanitize_text_field( $_POST['product_type'] );