Media: Avoid PHP notices when trying to show a parent post title of an orphaned post type.

Props littler.chicken.
See #37186.

git-svn-id: https://develop.svn.wordpress.org/trunk@37952 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2016-07-04 19:33:43 +00:00
parent bc6e877446
commit f7c680e84f
2 changed files with 3 additions and 2 deletions

View File

@@ -481,7 +481,7 @@ class WP_Media_List_Table extends WP_List_Table {
?>
<strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
<?php echo $title ?></a></strong><?php
} elseif ( current_user_can( 'read_post', $post->post_parent ) ) {
} elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) {
?>
<strong><?php echo $title ?></strong><?php
} else {