Skip to content

Commit

Permalink
fix removeNode function to prevent wrong deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
teiling88 committed May 17, 2019
1 parent 971d1d9 commit 2ac0b1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/NestedSetWriter.php
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,12 @@ public function removeNode(string $tableExpression, string $rootColumnName, int
"DELETE FROM {$tableExpression}
WHERE {$this->leftCol} >= :left
AND {$this->rightCol} <= :right
",
AND {$this->rootCol} = :rootId
",
[
'left' => $node['left'],
'right' => $node['right'],
'rootId' => $node['root_id'],
]
);

Expand Down

0 comments on commit 2ac0b1a

Please sign in to comment.