diff --git src/wp-admin/includes/class-wp-comments-list-table.php src/wp-admin/includes/class-wp-comments-list-table.php
index 77733f1..4af0936 100644
--- src/wp-admin/includes/class-wp-comments-list-table.php
+++ src/wp-admin/includes/class-wp-comments-list-table.php
@@ -552,7 +552,11 @@ class WP_Comments_List_Table extends WP_List_Table {
$this->comments_bubble( $post->ID, $pending_comments );
echo ' ';
$post_type_object = get_post_type_object( $post->post_type );
- echo "" . $post_type_object->labels->view_item . '';
+
+ if ( null != $post_type_object ) {
+ echo "" . $post_type_object->labels->view_item . '';
+ }
+
echo '';
if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) )
echo $thumb;
diff --git src/wp-includes/capabilities.php src/wp-includes/capabilities.php
index 45be4b5..3556711 100644
--- src/wp-includes/capabilities.php
+++ src/wp-includes/capabilities.php
@@ -1076,6 +1076,11 @@ function map_meta_cap( $cap, $user_id ) {
}
$post_type = get_post_type_object( $post->post_type );
+
+ if ( is_null( $post_type ) ) {
+ $caps[] = 'do_not_allow';
+ break;
+ }
if ( ! $post_type->map_meta_cap ) {
$caps[] = $post_type->cap->$cap;
@@ -1122,6 +1127,16 @@ function map_meta_cap( $cap, $user_id ) {
}
$post_type = get_post_type_object( $post->post_type );
+
+ if ( is_null( $post_type ) ) {
+ $caps[] = 'do_not_allow';
+ break;
+ }
+
+ if ( is_null( $post_type ) ) {
+ $caps[] = 'do_not_allow';
+ break;
+ }
if ( ! $post_type->map_meta_cap ) {
$caps[] = $post_type->cap->$cap;