WordPress.org

Make WordPress Core

Ticket #18722: 18722.check-ptype_object.diff

File 18722.check-ptype_object.diff, 564 bytes (added by duck_, 2 years ago)
  • wp-admin/includes/class-wp-terms-list-table.php

     
    290290                $tax = get_taxonomy( $taxonomy ); 
    291291 
    292292                $post_type = get_current_screen()->post_type; 
     293 
    293294                $ptype_object = get_post_type_object( $post_type ); 
    294  
    295                 if ( ! $ptype_object->show_ui ) 
     295                if ( ! $ptype_object || ! $ptype_object->show_ui ) 
    296296                        return $count; 
    297297 
    298298                if ( $tax->query_var ) {