Skip to content

Commit 931b037

Browse files
committed
Merge branch '6.0' into 6.1
* 6.0: [Security][Serializer] Add missing args to trigger_deprecation Added Urdu Language Translation in Form Component, Security Core and in Validator Component Merge upgrade notes for Serializer component Throw LogicException instead of Error when trying to generate logout-URL without request [Intl] Update the ICU data to 72.1 - 5.4 [Notifier] Update README for FreeMobile
2 parents 7894925 + a91feca commit 931b037

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Logout/LogoutUrlGenerator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ private function generateLogoutUrl(?string $key, int $referenceType): string
9494

9595
$request = $this->requestStack->getCurrentRequest();
9696

97+
if (!$request) {
98+
throw new \LogicException('Unable to generate the logout URL without a Request.');
99+
}
100+
97101
$url = UrlGeneratorInterface::ABSOLUTE_URL === $referenceType ? $request->getUriForPath($logoutPath) : $request->getBaseUrl().$logoutPath;
98102

99103
if (!empty($parameters)) {

0 commit comments

Comments
 (0)