Ticket #22312: 22312.diff

File 22312.diff, 504 bytes (added by trepmal, 7 months ago)
  • wp-includes/capabilities.php

     
    10731073                } 
    10741074 
    10751075                $post_type = get_post_type_object( $post->post_type ); 
    1076  
     1076                if ( is_null( $post_type ) ) { 
     1077                        $caps[] = 'do_not_allow'; 
     1078                        break; 
     1079                } 
    10771080                if ( ! $post_type->map_meta_cap ) { 
    10781081                        $caps[] = $post_type->cap->$cap; 
    10791082                        // Prior to 3.1 we would re-call map_meta_cap here.