From d4986f1b615be1a9b8354d63ee384d73e8e50881 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 17 Mar 2014 15:32:32 +0000 Subject: [PATCH] Avoid PHP notices in Media Library if an attachment parent post type no longer exists. props wpsmith. fixes #27439. git-svn-id: https://develop.svn.wordpress.org/trunk@27560 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/includes/class-wp-media-list-table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index c9df68629e..48e4363980 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -329,7 +329,7 @@ foreach ( $columns as $column_name => $column_display_name ) { $parent_type = get_post_type_object( $parent->post_type ); ?> > - post_parent ) && $parent_type->show_ui ) { ?> + post_parent ) && $parent_type && $parent_type->show_ui ) { ?>