Make WordPress Core


Ignore:
Timestamp:
07/04/2016 07:33:43 PM (7 years ago)
Author:
SergeyBiryukov
Message:

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

Props littler.chicken.
See #37186.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-media-list-table.php

    r37941 r37952  
    482482                <strong><a href="<?php echo get_edit_post_link( $post->post_parent ); ?>">
    483483                    <?php echo $title ?></a></strong><?php
    484             } elseif ( current_user_can( 'read_post', $post->post_parent ) ) {
     484            } elseif ( $parent_type && current_user_can( 'read_post', $post->post_parent ) ) {
    485485?>
    486486                <strong><?php echo $title ?></strong><?php
Note: See TracChangeset for help on using the changeset viewer.