Skip to content

Commit 89d1cea

Browse files
authored
Key Select: Fix zeros to work in key selects (#2803)
* fix: csv import to allow 0 items of sample data and field options * fix: zero key selects to work
1 parent d2a5778 commit 89d1cea

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dt-posts/posts.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2496,7 +2496,7 @@ public static function adjust_post_custom_fields( $post_type, int $post_id, arra
24962496
}
24972497
}
24982498
} elseif ( isset( $field_settings[$key] ) && $field_settings[$key]['type'] == 'key_select' && ( !isset( $field_settings[$key]['private'] ) || !$field_settings[$key]['private'] ) ) {
2499-
if ( empty( $value[0]['value'] ) ) {
2499+
if ( $value[0]['value'] === '' ) {
25002500
unset( $fields[$key] );
25012501
continue;
25022502
}

0 commit comments

Comments
 (0)