Skip to content

Commit

Permalink
Use ltrim instead of str replace for locale in prepare slug
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Jun 3, 2024
1 parent d5b7f11 commit 779b063
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Routing/RequestContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private function prepareSlug(string $slug): string
return $slug;
}

return str_replace(sprintf('%s/', $localeCode), '', $slug);
return ltrim($slug, sprintf('%s/', $localeCode));
}

/**
Expand Down

0 comments on commit 779b063

Please sign in to comment.