Opened 8 years ago
Last modified 5 years ago
#37627 new defect (bug)
Custom Fields Heading shows up when all meta values are serialized arrays/objects
Reported by: | implenton | Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | ui, administration | Cc: |
Description (last modified by )
_list_meta_row
skips the meta rows when the value is a serialized array/objects.
When all meta values are serialized arrays/objects OR when you only have one meta with the value being serialized array/object the table heading shows up:
There is a check for protected metas before the table rendering
wp-admin/includes/meta-boxes.php:631
$metadata = has_meta($post->ID); foreach ( $metadata as $key => $value ) { if ( is_protected_meta( $metadata[ $key ][ 'meta_key' ], 'post' ) || ! current_user_can( 'edit_post_meta', $post->ID, $metadata[ $key ][ 'meta_key' ] ) ) unset( $metadata[ $key ] ); } list_meta( $metadata );
but it does not take in account meta values, which are skipped later.
This might be considered an edge case, but it is better to be noted.
Discovered this when I reported: #37626
Attachments (2)
Change History (6)
Note: See
TracTickets for help on using
tickets.
Check for serialized array/objects values early