Changes between Initial Version and Version 1 of Ticket #23405
- Timestamp:
- 02/06/2013 11:13:08 AM (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #23405 – Description
initial v1 1 If you call '''get_blog_details''' for a blog which doesn't exist yet in '''wp_blogs''' then we cache a negative lookup result as '''-1''':1 If you call {{{get_blog_details}}} for a blog which doesn't exist yet in {{{wp_blogs}}} then we cache a negative lookup result as {{{-1}}}: 2 2 3 3 https://core.trac.wordpress.org/browser/trunk/wp-includes/ms-blogs.php?rev=23389#L217 4 ''' 4 {{{ 5 5 if ( empty($details) ) { 6 6 $details = $wpdb->get_row( $wpdb->prepare( "SELECT * FROM $wpdb->blogs WHERE blog_id = %d /* get_blog_details */", $blog_id ) ); … … 11 11 } 12 12 } 13 ''' 13 }}} 14 14 15 When you then later call '''refresh_blog_details''' to clear up the cache for the blog_id the cached '''-1''' is passed to '''clean_blog_cache'''which then tries to get a blog_id from the object that was returned and doesn't get the right one and the cached are not deleted.15 When you then later call {{{refresh_blog_details}}} to clear up the cache for the blog_id the cached {{{-1}}} is passed to {{{clean_blog_cache}}} which then tries to get a blog_id from the object that was returned and doesn't get the right one and the cached are not deleted. 16 16 17 17 This means that the blog ends up broken :(