WordPress.org

Make WordPress Core

Changeset 21791


Ignore:
Timestamp:
09/10/12 16:45:49 (19 months ago)
Author:
ryan
Message:

Check for an empty post in wp_popular_terms_checklist(). _wp_ajax_add_hierarchical_term() doesn't set up global post info. Props SergeyBiryukov. see #21309

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/template.php

    r21789 r21791  
    168168function wp_popular_terms_checklist( $taxonomy, $default = 0, $number = 10, $echo = true ) { 
    169169    $post = get_post(); 
    170     if ( $post->ID ) 
     170 
     171    if ( $post && $post->ID ) 
    171172        $checked_terms = wp_get_object_terms($post->ID, $taxonomy, array('fields'=>'ids')); 
    172173    else 
Note: See TracChangeset for help on using the changeset viewer.