[BUG] fix(AdminUrlGenerator): unitialize before early returns
Hi ! I noticed that trying to upgrade after 4.16.1 (and this commit I believe https://github.com/EasyCorp/EasyAdminBundle/commit/dc4bc4cafe2695028e70d326e1dbc635d8a90ce2 ) while still not using pretty urls (we intend to, but it is a long journey ^^), some of the generated urls break.
For instance, the url for filter modal becomes htps://localhost/admin?crudAction=renderFilters. Every other param disappears.
I noticed that the previous generated url was one for the dashboard with then went trough this code bloc :
if ([] === $routeParameters) {
return $this->urlGenerator->generate($this->dashboardRoute);
}
I figured the previous AdminUrlGenerator was then not uninitialized, which might leak wrong params to the next generated url.
This seems at least to fix my issue, but I might be missing something, WDYT ?
Would like this one, same issue here !