Check if posted data is_array before doing wc_clean in checkout

This commit is contained in:
Illimar Tambek 2014-06-03 14:16:19 +03:00
parent 4c18ab831a
commit 6302c0fb8a
1 changed files with 1 additions and 1 deletions

View File

@ -487,7 +487,7 @@ class WC_Checkout {
$this->posted[ $key ] = isset( $_POST[ $key ] ) ? wp_strip_all_tags( wp_check_invalid_utf8( stripslashes( $_POST[ $key ] ) ) ) : '';
break;
default :
$this->posted[ $key ] = isset( $_POST[ $key ] ) ? wc_clean( $_POST[ $key ] ) : '';
$this->posted[ $key ] = isset( $_POST[ $key ] ) ? ( is_array( $_POST[ $key ] ) ? array_map( 'wc_clean', $_POST[ $key ] ) : wc_clean( $_POST[ $key ] ) ) : '';
break;
}