#14260 Fixed configuration for DefaultLang and Lang #14261
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
$GLOBALS['cfg']
is not set before :phpmyadmin/libraries/common.inc.php
Line 287 in bb9fc5d
So
$GLOBALS['cfg']
cannot be used inphpmyadmin/libraries/common.inc.php
Line 255 in bb9fc5d
phpmyadmin/libraries/classes/LanguageManager.php
Lines 822 to 831 in bb9fc5d
And
phpmyadmin/libraries/classes/LanguageManager.php
Lines 886 to 892 in bb9fc5d
Solution
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