whoops, make wp_list_pages not spew a warning when there are no pages

git-svn-id: http://svn.automattic.com/wordpress/trunk@2360 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
michelvaldrighi 2005-02-17 00:11:35 +00:00
parent 281573e628
commit 11aea9b0bc

View File

@ -297,10 +297,12 @@ function get_pages($args = '') {
"$exclusions " .
"ORDER BY " . $r['sort_column'] . " " . $r['sort_order']);
foreach($pages as $page) {
$cache_pages[$page->ID] = $page;
$cache_pages = array();
if (count($pages)) {
foreach($pages as $page) {
$cache_pages[$page->ID] = $page;
}
}
}
return $cache_pages;