Changeset 3601

Show
Ignore:
Timestamp:
01/23/08 17:26:47 (18 months ago)
Author:
romanb
Message:

Fixed a bug in Doctrine_Node_nestedSet::getPath().

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.9/lib/Doctrine/Node/NestedSet.php

    r2967 r3601  
    303303        $path = array(); 
    304304        $ancestors = $this->getAncestors(); 
    305         foreach ($ancestors as $ancestor) { 
    306             $path[] = $ancestor->__toString(); 
     305        if ($ancestors) { 
     306            foreach ($ancestors as $ancestor) { 
     307                $path[] = $ancestor->__toString(); 
     308            } 
    307309        } 
    308310        if ($includeRecord) {