diff --git a/wp-admin/edit-attachment-rows.php b/wp-admin/edit-attachment-rows.php index fc60dbefc6..407436b309 100644 --- a/wp-admin/edit-attachment-rows.php +++ b/wp-admin/edit-attachment-rows.php @@ -85,16 +85,22 @@ foreach($posts_columns as $column_name=>$column_display_name) { break; case 'parent': - if ( $post_parent = get_post($post->post_parent) ) { - $title = get_the_title($post->post_parent); - if ( empty($title) ) - $title = __('(no title)'); + $title = __('(no title)'); // override below + if ( $post->post_parent > 0 ) { + if ( get_post($post->post_parent) ) { + $parent_title = get_the_title($post->post_parent); + if ( !empty($parent_title) ) + $title = $parent_title; + } + ?> +