mirror of
https://github.com/WordPress/WordPress.git
synced 2024-09-27 06:42:56 +02:00
Cache empty results for adjacent post queries
git-svn-id: http://svn.automattic.com/wordpress/trunk@11243 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
d70e393e86
commit
63620ff895
@ -912,6 +912,9 @@ function get_adjacent_post($in_same_cat = false, $excluded_categories = '', $pre
|
||||
return $result;
|
||||
|
||||
$result = $wpdb->get_row("SELECT p.* FROM $wpdb->posts AS p $join $where $sort");
|
||||
if ( null === $result )
|
||||
$result = '';
|
||||
|
||||
wp_cache_set($query_key, $result, 'counts');
|
||||
return $result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user