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

git-svn-id: http://svn.automattic.com/wordpress/trunk@11548 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-06-11 00:04:20 +00:00
parent de9947cc09
commit 4a60e70973
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' );