1
0
mirror of https://github.com/processwire/processwire.git synced 2025-08-08 15:57:01 +02:00

Fix issue in PagePathFinder where LanguageSupportPageNames module in use without using homepage language segments, combined with multi-language PagePathHistory module, could result in default language incorrectly detected from URL.

This commit is contained in:
Ryan Cramer
2024-04-08 09:08:19 -04:00
parent 7438ae90ca
commit 9e6b89cf93

View File

@@ -789,7 +789,7 @@ class PagesPathFinder extends Wire {
// if there were any non-default language segments, let that dictate the language
if(empty($result['language']['segment'])) {
$useLangName = 'default';
$useLangName = count($result['parts']) ? 'default' : $result['language']['name'];
foreach($result['parts'] as $part) {
$langName = $part['language'];
if(empty($langName) || $langName === 'default') continue;