mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-14 14:45:45 +01:00
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:
parent
281573e628
commit
11aea9b0bc
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user