From d83e614ab59d291a9de8f76149cb567989d05b72 Mon Sep 17 00:00:00 2001 From: Peter Westwood 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: https://develop.svn.wordpress.org/trunk@14829 602fd350-edb4-49c9-b593-d223f7449a82 --- 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 7f041db939..8bc3d63d7f 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(); ?>