Skip to content

Commit

Permalink
Fix array->string conversion notice in carousel (#8509)
Browse files Browse the repository at this point in the history
  • Loading branch information
gravityrail authored and dereksmart committed Jan 12, 2018
1 parent ccc5ce7 commit e1e0f1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/carousel/jetpack-carousel.php
Expand Up @@ -441,7 +441,7 @@ function add_data_to_images( $attr, $attachment = null ) {
unset( $img_meta['keywords'] );
}

$img_meta = json_encode( array_map( 'strval', $img_meta ) );
$img_meta = json_encode( array_map( 'strval', array_filter( $img_meta, 'is_scalar' ) ) );

$attr['data-attachment-id'] = $attachment_id;
$attr['data-permalink'] = esc_attr( get_permalink( $attachment->ID ) );
Expand Down

0 comments on commit e1e0f1d

Please sign in to comment.