Make WordPress Core

Ticket #10381: 10381.2.diff

File 10381.2.diff, 550 bytes (added by Denis-de-Bernardy, 15 years ago)
  • wp-includes/post.php

     
    262262                        _get_post_ancestors($_post);
    263263                        $_post = sanitize_post($_post, 'raw');
    264264                        wp_cache_add($_post->ID, $_post, 'posts');
     265                } elseif ( !isset($_post->ancestors) ) {
     266                        global $_wp_using_ext_object_cache;
     267                        if ( $_wp_using_ext_object_cache ) {
     268                                _get_post_ancestors($_post);
     269                                wp_cache_replace($_post->ID, $_post, 'posts');
     270                        }
    265271                }
    266272        }
    267273