PluginProbe
Jetpack – WP Security, Backup, Speed, & Growth / 16.3
Jetpack – WP Security, Backup, Speed, & Growth v16.3
16.3 16.3-beta 16.3-a.5 16.3-a.7 16.3-a.3 16.3-a.1 16.2 16.2-beta 12.0.3 12.1.3 12.2.3 12.3.2 12.4.2 12.5.2 12.6.4 12.7.3 12.8.3 12.9.5 13.0.2 13.1.5 13.2.4 13.3.3 13.4.5 13.5.2 13.6.2 All 508 releases
← All changes | jetpack_vendor/automattic/jetpack-post-media/src/class-images.php +5 -2 16.2 → 16.3 View file →
@@ -282,8 +282,11 @@
282 282
283 283 $permalink = get_permalink( $post_id );
284 284
285 285 foreach ( $post_images as $post_image ) {
286 + if ( ! $post_image instanceof \WP_Post ) {
287 + continue;
288 + }
286 289 $current_image = self::get_attachment_data( $post_image->ID, $permalink, $width, $height );
287 290 if ( false !== $current_image ) {
288 291 $images[] = $current_image;
289 292 }
@@ -851,9 +854,9 @@
851 854 $media = self::get_images( $post_id, $args );
852 855
853 856 if ( is_array( $media ) ) {
854 857 foreach ( $media as $item ) {
855 - if ( 'image' === $item['type'] ) {
858 + if ( is_array( $item ) && isset( $item['type'] ) && 'image' === $item['type'] ) {
856 859 $image = $item;
857 860 break;
858 861 }
859 862 }
@@ -1117,9 +1120,9 @@
1117 1120 if ( empty( $meta ) ) {
1118 1121 return false;
1119 1122 }
1120 1123
1121 - if ( ! empty( $meta['videopress'] ) ) {
1124 + if ( isset( $meta['videopress']['poster'] ) && isset( $meta['videopress']['width'] ) && isset( $meta['videopress']['height'] ) ) {
1122 1125 // Use poster image for VideoPress videos.
1123 1126 $url = $meta['videopress']['poster'];
1124 1127 $meta_width = $meta['videopress']['width'];
1125 1128 $meta_height = $meta['videopress']['height'];