Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#14260 Fixed configuration for DefaultLang and Lang #14261

merged 1 commit into from May 7, 2018


Copy link

$GLOBALS['cfg'] is not set before :


So $GLOBALS['cfg'] cannot be used in
$language = LanguageManager::getInstance()->selectLanguage();

public function selectLanguage()
// check forced language
if (! empty($GLOBALS['cfg']['Lang'])) {
$lang = $this->getLanguage($GLOBALS['cfg']['Lang']);
if ($lang !== false) {
return $lang;
$this->_lang_failed_cfg = true;


if (isset($langs[$GLOBALS['cfg']['DefaultLang']])) {
return $langs[$GLOBALS['cfg']['DefaultLang']];
// Fallback to English
return $langs['en'];


Migrate to $GLOBALS['PMA_Config']->get('nameofkey') instead of $GLOBALS['cfg']['nameofkey']

More info

Unit tests never failed because the globals where setup for the test.
I updated the test and added a test case that was not covered (cookie test case)

Closes: #14260

Closes: phpmyadmin#14260
Signed-off-by: William Desportes <>
Copy link
Member Author

@MauricioFauth CodeCov seems broken ...

Should we add php-recode extension ?
recode extension missing

@MauricioFauth MauricioFauth merged commit 923157d into phpmyadmin:master May 7, 2018
@MauricioFauth MauricioFauth self-assigned this May 7, 2018
Copy link

Merged, thanks for your contribution!

@MauricioFauth MauricioFauth added this to the 4.8.1 milestone May 7, 2018
Copy link

The test should not fail if the recode extension is missing.
Apparently it was a network error.
WARNING Unable to get report from archive, will try again.
ERROR Max retries exceeded

@williamdes williamdes deleted the issue-14260-langs-cfg branch May 7, 2018 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants