Navigation Menu

Skip to content

Commit

Permalink
Fix broken tree behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
dakota committed Feb 12, 2016
1 parent ee8e168 commit c51b945
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ORM/Behavior/TreeBehavior.php
Expand Up @@ -846,10 +846,10 @@ protected function _recoverTree($counter = 0, $parentId = null, $level = -1)
protected function _getMax()
{
$field = $this->_config['right'];
$leftField = $this->_config['leftField'];
$rightField = $this->_config['rightField'];
$edge = $this->_scope($this->_table->find())
->select([$field])
->orderDesc($leftField)
->orderDesc($rightField)
->first();

if (empty($edge->{$field})) {
Expand Down

0 comments on commit c51b945

Please sign in to comment.