Skip to content

Commit b926cc3

Browse files
committed
Fix node remove command from throwing an PHPCR\InvalidItemStateException
1 parent 89165ea commit b926cc3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/PHPCR/Util/Console/Command/NodeRemoveCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ protected function execute(InputInterface $input, OutputInterface $output)
105105

106106
/** @var $childNode NodeInterface */
107107
foreach ($baseNode->getNodes() as $childNode) {
108+
$childNodePath = $childNode->getPath();
108109
$childNode->remove();
109-
$output->writeln(sprintf($message, $childNode->getPath()));
110+
$output->writeln(sprintf($message, $childNodePath));
110111
}
111112
} else {
112113
$session->removeItem($path);

0 commit comments

Comments
 (0)