Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Registry/Nlsconfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

use Horde\Core\Config\BackendConfigLoader;
use Horde\Core\LanguageContext;
use Horde\Core\LanguageContextSelector;
use Horde\Core\Session\SessionAccess;
use Horde_Prefs;

Expand Down Expand Up @@ -87,10 +88,10 @@ public function preferredLang(?string $lang = null): string
return basename($lang);
}

if (!empty($serverEnvironment)) {
if (!empty($this->serverEnvironment)) {
$partialLang = null;

foreach (explode(',', $serverEnvironment) as $browserLang) {
foreach (explode(',', $this->serverEnvironment) as $browserLang) {
if (($pos = strpos($browserLang, ';')) !== false) {
$browserLang = substr($browserLang, 0, $pos);
}
Expand Down
2 changes: 1 addition & 1 deletion test/Unit/Registry/NlsconfigTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ protected function tearDown(): void

private function makeNlsconfig(): Nlsconfig
{
return new Nlsconfig($this->sessionAccessor, $this->configLoader);
return new Nlsconfig($this->configLoader, null, $this->sessionAccessor);
}

public function testImplementsLanguageContext(): void
Expand Down
Loading