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
|
|
class WP_Comments_List_Table extends WP_List_Table { |
552 | 552 | $this->comments_bubble( $post->ID, $pending_comments ); |
553 | 553 | echo '</span> '; |
554 | 554 | $post_type_object = get_post_type_object( $post->post_type ); |
555 | | echo "<a href='" . get_permalink( $post->ID ) . "'>" . $post_type_object->labels->view_item . '</a>'; |
| 555 | |
| 556 | if ( null != $post_type_object ) { |
| 557 | echo "<a href='" . get_permalink( $post->ID ) . "'>" . $post_type_object->labels->view_item . '</a>'; |
| 558 | } |
| 559 | |
556 | 560 | echo '</div>'; |
557 | 561 | if ( 'attachment' == $post->post_type && ( $thumb = wp_get_attachment_image( $post->ID, array( 80, 60 ), true ) ) ) |
558 | 562 | echo $thumb; |
diff --git src/wp-includes/capabilities.php src/wp-includes/capabilities.php
index 45be4b5..3556711 100644
|
|
function map_meta_cap( $cap, $user_id ) { |
1076 | 1076 | } |
1077 | 1077 | |
1078 | 1078 | $post_type = get_post_type_object( $post->post_type ); |
| 1079 | |
| 1080 | if ( is_null( $post_type ) ) { |
| 1081 | $caps[] = 'do_not_allow'; |
| 1082 | break; |
| 1083 | } |
1079 | 1084 | |
1080 | 1085 | if ( ! $post_type->map_meta_cap ) { |
1081 | 1086 | $caps[] = $post_type->cap->$cap; |
… |
… |
function map_meta_cap( $cap, $user_id ) { |
1122 | 1127 | } |
1123 | 1128 | |
1124 | 1129 | $post_type = get_post_type_object( $post->post_type ); |
| 1130 | |
| 1131 | if ( is_null( $post_type ) ) { |
| 1132 | $caps[] = 'do_not_allow'; |
| 1133 | break; |
| 1134 | } |
| 1135 | |
| 1136 | if ( is_null( $post_type ) ) { |
| 1137 | $caps[] = 'do_not_allow'; |
| 1138 | break; |
| 1139 | } |
1125 | 1140 | |
1126 | 1141 | if ( ! $post_type->map_meta_cap ) { |
1127 | 1142 | $caps[] = $post_type->cap->$cap; |