Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit 7e5c97d

Browse files
author
Ben Glassman
committed
Use absolutizePath to support absolute and relative paths.
1 parent ac988d3 commit 7e5c97d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Provider/PhpcrMenuProvider.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function get($name, array $options = array())
124124
throw new \InvalidArgumentException('The menu name may not be empty');
125125
}
126126

127-
$menu = $this->getObjectManager()->find(null, $this->menuRoot . '/' . $name);
127+
$menu = $this->getObjectManager()->find(null, \PHPCR\Util\PathHelper::absolutizePath($name, $this->menuRoot));
128128
if ($menu === null) {
129129
throw new \InvalidArgumentException(sprintf('The menu "%s" is not defined.', $name));
130130
}
@@ -152,7 +152,7 @@ public function get($name, array $options = array())
152152
*/
153153
public function has($name, array $options = array())
154154
{
155-
$menu = $this->getObjectManager()->find(null, $this->menuRoot . '/' . $name);
155+
$menu = $this->getObjectManager()->find(null, \PHPCR\Util\PathHelper::absolutizePath($name, $this->menuRoot));
156156

157157
return $menu instanceof NodeInterface;
158158
}

0 commit comments

Comments
 (0)