fatal error in UrlGenerator->getRoute

Created on 24 March 2025, 9 days ago

Problem/Motivation

Fatal error __clone method called on non-object in Drupal\Core\Routing\UrlGenerator->getRoute

when $name = ''

Function expects to throw specific error instead:

```
@throws \Symfony\Component\Routing\Exception\RouteNotFoundException
```

Steps to reproduce

For me it was using drush uli to login after pulling DB down, the language `en` was not available due to config split.

So "" isn't a loadable route. We need better steps to reproduce.

Proposed resolution

Do not clone if route isn't an object.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Active

Version

10.5 ✨

Component

routing system

Created by

πŸ‡ΊπŸ‡ΈUnited States oknate Greater New York City Area

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024