From 437a09348b65a68c9da9dae7de7839777d0e73da Mon Sep 17 00:00:00 2001 From: westi Date: Mon, 24 May 2010 08:33:51 +0000 Subject: [PATCH] Check to see we have posts before calling the_post(). Fixes #13510 props dd32. git-svn-id: http://svn.automattic.com/wordpress/trunk@14829 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-content/themes/twentyten/archive.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-content/themes/twentyten/archive.php b/wp-content/themes/twentyten/archive.php index 7f041db93..8bc3d63d7 100644 --- a/wp-content/themes/twentyten/archive.php +++ b/wp-content/themes/twentyten/archive.php @@ -25,7 +25,8 @@ * We reset this later so we can run the loop * properly with a call to rewind_posts(). */ - the_post(); + if ( have_posts() ) + the_post(); ?>