From 640f539e89cac29aa7c545673516422f4d38b36d Mon Sep 17 00:00:00 2001 From: Wilmer Arambula Date: Tue, 1 Jul 2025 07:26:23 -0400 Subject: [PATCH] fix: Correct `left`-`right` attribute shifting logic in `NestedSetsBehavior` class. --- src/NestedSetsBehavior.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NestedSetsBehavior.php b/src/NestedSetsBehavior.php index c2a6698..5f12921 100644 --- a/src/NestedSetsBehavior.php +++ b/src/NestedSetsBehavior.php @@ -1250,7 +1250,7 @@ protected function moveNode(ActiveRecord $node, int $value, int $depth): void ); } - $this->shiftLeftRightAttribute($rightValue + 1, -$delta); + $this->shiftLeftRightAttribute($rightValue, -$delta); } else { $leftAttribute = $db->quoteColumnName($this->leftAttribute); $rightAttribute = $db->quoteColumnName($this->rightAttribute);