Prevent foreach errors, should probably be moved to new loop method?

git-svn-id: http://svn.automattic.com/wordpress/trunk@1957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
saxmatt 2004-12-14 09:48:34 +00:00
parent ed31b29e05
commit 5854661314
1 changed files with 2 additions and 2 deletions

View File

@ -14,7 +14,7 @@ echo '<?xml version="1.0" encoding="'.get_settings('blog_charset').'"?'.'>';
<channel>
<?php
$i = 0;
foreach ($posts as $post) { start_wp();
if ($posts) { foreach ($posts as $post) { start_wp();
if ($i < 1) {
$i++;
?>
@ -68,7 +68,7 @@ foreach ($posts as $post) { start_wp();
}
}
}
}
} }
?>
</channel>
</rss>