Skip to content

Commit deff18e

Browse files
committed
corrected idPrefix check logic in getRoutesByNames()
1 parent b1b3bb6 commit deff18e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Doctrine/Phpcr/RouteProvider.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@ public function getRoutesByNames($names, $parameters = array())
143143
{
144144
$routes = array();
145145
if ('' === $this->idPrefix) {
146+
$routes = $names;
147+
} else {
146148
foreach ($names as $name) {
147-
if ('' === $this->idPrefix || 0 === strpos($name, $this->idPrefix)) {
149+
if (0 === strpos($name, $this->idPrefix)) {
148150
$routes[] = $name;
149151
}
150152
}
151-
} else {
152-
$routes = $names;
153153
}
154154

155155
$collection = $this->getObjectManager()->findMany($this->className, $routes);

0 commit comments

Comments
 (0)