Commit 42170dd4 authored by romanb's avatar romanb

Fixed #328

Ticket: 328
parent bc717ac9
......@@ -171,12 +171,15 @@ class Doctrine_Tree_NestedSet extends Doctrine_Tree implements Doctrine_Tree_Int
public function fetchBranch($pk, $options = array())
{
$record = $this->table->find($pk);
if ( ! ($record instanceof Doctrine_Record)) {
// TODO: if record doesn't exist, throw exception or similar?
return false;
}
if ($record->exists()) {
$options = array_merge(array('include_record'=>true), $options);
return $record->getNode()->traverse('Pre', $options);
}
// TODO: if record doesn't exist, throw exception or similar?
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment