Prevent notice in thumbnails html

Fixes #14114
This commit is contained in:
Mike Jolley 2017-04-07 17:05:28 +01:00
parent 89fd848037
commit 2638f61a86
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ if ( $attachment_ids && has_post_thumbnail() ) {
$full_size_image = wp_get_attachment_image_src( $attachment_id, 'full' );
$thumbnail = wp_get_attachment_image_src( $attachment_id, 'shop_thumbnail' );
$thumbnail_post = get_post( $attachment_id );
$image_title = $thumbnail_post->post_content;
$image_title = $thumbnail_post ? $thumbnail_post->post_content : '';
$attributes = array(
'title' => $image_title,