Ticket #2878: theme-compat.php.patch
| File theme-compat.php.patch, 615 bytes (added by , 11 years ago) |
|---|
-
includes/core/theme-compat.php
383 383 // Set the $post global 384 384 $post = new WP_Post( (object) $dummy ); 385 385 386 // Add $post to cache to fix the bug if page template loads 387 // comments and triggers the error with missing post 388 wp_cache_add($post->ID, $post, 'posts'); 389 386 390 // Copy the new post global into the main $wp_query 387 391 $wp_query->post = $post; 388 392 $wp_query->posts = array( $post );