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:
ryan 2009-05-08 19:47:30 +00:00
parent d70e393e86
commit 63620ff895
1 changed files with 3 additions and 0 deletions

View File

@ -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;
}