Skip to content

Commit

Permalink
fix locale url mapping if empty (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
benwalch committed Apr 24, 2024
1 parent 3a4ef71 commit 07ec2f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions UPGRADE.md
@@ -1,5 +1,8 @@
# Upgrade Notes

## 5.0.2
- fixed bug when no locale url mapping is available [#153](https://github.com/dachcom-digital/pimcore-i18n/pull/153)

## 5.0.1
- Remove `isEnabled` and `setEnabled` from redirector adapter since disabled services aren't available anymore [#149](https://github.com/dachcom-digital/pimcore-i18n/issues/149)
- Remove legacy mode check in profiler [#150](https://github.com/dachcom-digital/pimcore-i18n/issues/150)
Expand Down
2 changes: 1 addition & 1 deletion src/Modifier/RouteModifier.php
Expand Up @@ -86,7 +86,7 @@ public function parseLocaleUrlMapping(ZoneInterface $zone, string $path, string
//transform locale style to given url mapping - if existing
$urlMapping = $zone->getLocaleUrlMapping();

if (!array_key_exists($locale, $urlMapping)) {
if (!array_key_exists($locale, $urlMapping) || empty($urlMapping[$locale])) {
return $path;
}

Expand Down

0 comments on commit 07ec2f3

Please sign in to comment.