Skip to content

Commit 076c7d4

Browse files
committed
use UUIDHelper::isUUID($id)
1 parent fcd5190 commit 076c7d4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
namespace PHPCR\Util\Console\Command;
2323

24+
use PHPCR\Util\UUIDHelper;
2425
use Symfony\Component\Console\Command\Command;
2526
use PHPCR\ItemNotFoundException;
2627
use PHPCR\RepositoryException;
@@ -115,10 +116,10 @@ protected function execute(InputInterface $input, OutputInterface $output)
115116
}
116117

117118
try {
118-
if (strpos($identifier, '/') === 0) {
119-
$node = $session->getNode($identifier);
120-
} else {
119+
if (UUIDHelper::isUUID($identifier)) {
121120
$node = $session->getNodeByIdentifier($identifier);
121+
} else {
122+
$node = $session->getNode($identifier);
122123
}
123124
$walker->traverse($node, $input->getOption('depth'));
124125
} catch (RepositoryException $e) {

0 commit comments

Comments
 (0)