Merge pull request #18186 from woocommerce/fix/no-strict-array-select-settings

Option value comparison when saving select settings
This commit is contained in:
Mike Jolley 2017-12-15 12:18:26 +00:00 committed by GitHub
commit 7c029d18e9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -727,7 +727,7 @@ if ( ! class_exists( 'WC_Admin_Settings', false ) ) :
}
break;
case 'select':
$allowed_values = empty( $option['options'] ) ? array() : array_keys( $option['options'] );
$allowed_values = empty( $option['options'] ) ? array() : array_map( 'strval', array_keys( $option['options'] ) );
if ( empty( $option['default'] ) && empty( $allowed_values ) ) {
$value = null;
break;