Adjust #8165 to deal with 0

This commit is contained in:
Mike Jolley 2015-05-19 12:53:00 -04:00
parent 79a5c2e98d
commit c01bc43369
2 changed files with 2 additions and 2 deletions

View File

@ -982,7 +982,7 @@ class WC_Meta_Box_Product_Data {
$attribute_position = $_POST['attribute_position'];
$attribute_names_max_key = max( $attribute_names );
for ( $i = 0; $i < $attribute_names_max_key; $i++ ) {
for ( $i = 0; $i <= $attribute_names_max_key; $i++ ) {
if ( empty( $attribute_names[ $i ] ) ) {
continue;
}

View File

@ -590,7 +590,7 @@ class WC_AJAX {
$attribute_position = $data['attribute_position'];
$attribute_names_max_key = max( $attribute_names );
for ( $i = 0; $i < $attribute_names_max_key; $i++ ) {
for ( $i = 0; $i <= $attribute_names_max_key; $i++ ) {
if ( empty( $attribute_names[ $i ] ) ) {
continue;
}