Walker fix for when non elements are top-level. Props hailin. fixes #8150

git-svn-id: http://svn.automattic.com/wordpress/trunk@9685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-11-14 18:10:58 +00:00
parent 9fad7df3b2
commit 01746cf6b3
1 changed files with 2 additions and 1 deletions

View File

@ -911,7 +911,8 @@ class Walker {
*/ */
if ( empty($top_level_elements) ) { if ( empty($top_level_elements) ) {
$root = $elements[0]; $first = array_slice( $elements, 0, 1 );
$root = $first[0];
$top_level_elements = array(); $top_level_elements = array();
$children_elements = array(); $children_elements = array();