Fix check for a published post in calendar widget, props Denis-de-Bernardy, fixes #10091

git-svn-id: https://develop.svn.wordpress.org/trunk@11548 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz 2009-06-11 00:04:20 +00:00
parent c45adb5e47
commit ad0b56690a
1 changed files with 1 additions and 1 deletions

View File

@ -969,7 +969,7 @@ function get_calendar($initial = true) {
// Quick check. If we have no posts at all, abort!
if ( !$posts ) {
$gotsome = $wpdb->get_var("SELECT 1 FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1");
$gotsome = $wpdb->get_var("SELECT 1 as test FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1");
if ( !$gotsome ) {
$cache[ $key ] = '';
wp_cache_set( 'get_calendar', $cache, 'calendar' );