From 243d0f693787221c094b81370059a863015f5275 Mon Sep 17 00:00:00 2001 From: PaulZi Date: Fri, 15 Jan 2016 20:05:14 +0300 Subject: [PATCH] Fix possible wrong populateTree() --- NestedSetsBehavior.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NestedSetsBehavior.php b/NestedSetsBehavior.php index 62d7a11..d555d90 100644 --- a/NestedSetsBehavior.php +++ b/NestedSetsBehavior.php @@ -246,7 +246,7 @@ class NestedSetsBehavior extends Behavior $prev = $depth; } - $nodes[$this->owner->getAttribute($this->leftAttribute)] = $this->owner; + $nodes[] = $this->owner; foreach ($nodes as $node) { $key = $node->getAttribute($this->leftAttribute); if (isset($relates[$key])) {