From bfef727df3f8de0e8808e36476e8c0ac1d890562 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 17 Mar 2014 15:33:15 +0000 Subject: [PATCH] Avoid PHP notices in Media Library if an attachment parent post type no longer exists. props wpsmith. fixes #27439. Built from https://develop.svn.wordpress.org/trunk@27560 git-svn-id: http://core.svn.wordpress.org/trunk@27403 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-media-list-table.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-media-list-table.php b/wp-admin/includes/class-wp-media-list-table.php index c9df68629e..48e4363980 100644 --- a/wp-admin/includes/class-wp-media-list-table.php +++ b/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 ) { ?>