Skip to content

Commit

Permalink
Fixed one more case where false results needed to be filtered out.
Browse files Browse the repository at this point in the history
  • Loading branch information
zinigor committed Dec 25, 2018
1 parent 1981313 commit be19400
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion class.jetpack-post-images.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,10 @@ static function from_attachment( $post_id, $width = 200, $height = 200 ) {
$permalink = get_permalink( $post_id );

foreach ( $post_images as $post_image ) {
$images[] = self::get_attachment_data( $post_image->ID, $permalink, $width, $height );
$current_image = self::get_attachment_data( $post_image->ID, $permalink, $width, $height );
if ( false !== $current_image ) {
$images[] = $current_image;
}
}

/*
Expand Down

0 comments on commit be19400

Please sign in to comment.