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

Commit ac719e9

Browse files
committed
remove invalid basename calls
1 parent bda6f5a commit ac719e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

AutoRoute/PathExists/AutoIncrementPath.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
namespace Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\PathExists;
44

5+
use PHPCR\Util\PathHelper;
56
use Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\PathActionInterface;
67
use Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\BuilderContext;
78
use Symfony\Cmf\Bundle\RoutingAutoBundle\AutoRoute\RouteStack;
@@ -44,7 +45,7 @@ public function execute(RouteStack $routeStack)
4445
$newPath = sprintf('%s-%d', $path, $inc++);
4546
} while (null !== $this->dm->find(null, $newPath));
4647

47-
$routeStack->replaceLastPathElement(basename($newPath));
48+
$routeStack->replaceLastPathElement(PathHelper::getNodeName($newPath));
4849
$this->routeMaker->make($routeStack);
4950
}
5051
}

0 commit comments

Comments
 (0)