Commit 59d8ab1f authored by catch's avatar catch
Browse files

Issue #3184619 by neclimdul, quietone: Fix unreachable logic in UrlGenerator::getRoute

(cherry picked from commit 3730c17b)
parent b2b0f12b
......@@ -7,7 +7,6 @@
use Symfony\Component\HttpFoundation\RequestStack;
use Symfony\Component\Routing\RequestContext as SymfonyRequestContext;
use Symfony\Component\Routing\Route as SymfonyRoute;
use Symfony\Component\Routing\Exception\RouteNotFoundException;
use Drupal\Component\Utility\UrlHelper;
use Drupal\Core\PathProcessor\OutboundPathProcessorInterface;
use Drupal\Core\RouteProcessor\OutboundRouteProcessorInterface;
......@@ -423,8 +422,8 @@ protected function getRoute($name) {
if ($name instanceof SymfonyRoute) {
$route = $name;
elseif (NULL === $route = clone $this->provider->getRouteByName($name)) {
throw new RouteNotFoundException(sprintf('Route "%s" does not exist.', $name));
else {
$route = clone $this->provider->getRouteByName($name);
return $route;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment