nestedset extension problem

http://www.yiiframework.com/extension/nestedset/

cant handle this error:


Undefined index: children

Source File


C:\apache\localhost\www\protected\controllers\SiteController.php(24)


00019:     

00020:     private function printNestedTree($tree)

00021:     {

00022:         //print_r($tree);

00023:         $result = "<strong>".$tree['node']->name."</strong> (".$tree['node']->getLeftValue().",".$tree['node']->getRightValue().")";

00024:         if(is_array( $tree['children'] ))

00025:          {

00026:              $result .= "<ul>";

00027:              foreach($tree['children'] as $key => $child)

00028:              {

00029:                  $result .= "<li>";

00030:                  $result .= $key.": ".$this->printNestedTree($child);

00031:                  $result .= "</li>";

00032:              }

00033:              $result .= "</ul>";

00034:         }

00035:        

00036:         return $result; 

code-from author’s example

can somebody help me ?

Thx!