WordPress.org

Make WordPress Core

Ticket #5096: 5096.diff

File 5096.diff, 527 bytes (added by wojtek.szkutnik, 4 years ago)
  • wp-includes/post.php

     
    26732673                        $post_categories = array( get_option('default_category') ); 
    26742674                else 
    26752675                        $post_categories = array(); 
    2676         } else if ( 1 == count($post_categories) && '' == reset($post_categories) ) { 
     2676        } else if ( 1 == count($post_categories) && isset($post_categories[0]) && '' == reset($post_categories) ) { 
    26772677                return true; 
    26782678        } 
    26792679