diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index 3e8167076..8e1227303 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -944,6 +944,8 @@ function wp_get_attachment_link($id = 0, $size = 'thumbnail', $permalink = false $link_text = esc_attr($text); } elseif ( ( is_int($size) && $size != 0 ) or ( is_string($size) && $size != 'none' ) or $size != false ) { $link_text = wp_get_attachment_image($id, $size, $icon); + } else { + $link_text = ''; } if( trim($link_text) == '' )