Skip to content

Commit

Permalink
Fix null check introduced by phpcs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejolley committed Mar 13, 2018
1 parent 1dd558a commit a5a6d02
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ protected function read_variation_attributes( &$product ) {
);

// Empty value indicates that all options for given attribute are available.
if ( in_array( '', $values, true ) || empty( $values ) ) {
if ( in_array( null, $values, true ) || in_array( '', $values, true ) || empty( $values ) ) {
$values = $attribute['is_taxonomy'] ? wc_get_object_terms( $product->get_id(), $attribute['name'], 'slug' ) : wc_get_text_attributes( $attribute['value'] );
// Get custom attributes (non taxonomy) as defined.
} elseif ( ! $attribute['is_taxonomy'] ) {
Expand Down

0 comments on commit a5a6d02

Please sign in to comment.