Skip to content

Commit

Permalink
Merge branch 'QA_5_0'
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Feb 9, 2020
2 parents f4c7796 + e7eac68 commit fa8bada
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -50,6 +50,7 @@ phpMyAdmin - ChangeLog
- issue #15863 Fixed designer move menu icon not changing directions and tables menu list resize button
- issue #15854 Fixed black borders for full screen mode on Designer
- issue #15899 Fix "Uncaught TypeError: mb_strtoupper()" on the relational view of a view
- issue Fixed some php uncaught errors and notices on user missing extension

5.0.1 (2020-01-07)
- issue #15719 Fixed error 500 when browsing a table when $cfg['LimitChars'] used a string and not an int value
Expand Down
9 changes: 6 additions & 3 deletions libraries/classes/Core.php
Expand Up @@ -326,7 +326,7 @@ public static function getPHPDocLink(string $target): string
];

$lang = 'en';
if (in_array($GLOBALS['lang'], $php_doc_languages)) {
if (isset($GLOBALS['lang']) && in_array($GLOBALS['lang'], $php_doc_languages)) {
$lang = $GLOBALS['lang'];
}

Expand All @@ -345,6 +345,9 @@ public static function warnMissingExtension(
bool $fatal = false,
string $extra = ''
): void {
/** @var ErrorHandler $error_handler */
global $error_handler;

/* Gettext does not have to be loaded yet here */
if (function_exists('__')) {
$message = __(
Expand All @@ -367,11 +370,11 @@ public static function warnMissingExtension(
return;
}

$GLOBALS['error_handler']->addError(
$error_handler->addError(
$message,
E_USER_WARNING,
'',
'',
0,
false
);
}
Expand Down
4 changes: 2 additions & 2 deletions libraries/classes/Template.php
Expand Up @@ -55,11 +55,11 @@ public function __construct()
{
global $cfg;

/** @var Config $config */
/** @var Config|null $config */
$config = $GLOBALS['PMA_Config'];
if (static::$twig === null) {
$loader = new FilesystemLoader(self::BASE_PATH);
$cache_dir = $config->getTempDir('twig');
$cache_dir = $config !== null ? $config->getTempDir('twig') : null;
/* Twig expects false when cache is not configured */
if ($cache_dir === null) {
$cache_dir = false;
Expand Down
4 changes: 3 additions & 1 deletion libraries/classes/Url.php
Expand Up @@ -220,7 +220,9 @@ public static function getCommonRaw($params = [], $divider = '?')
$params['server'] = $GLOBALS['server'];
}

if (empty($PMA_Config->getCookie('pma_lang')) && ! empty($GLOBALS['lang'])) {
// Can be null when the user is missing an extension.
// See: Core::checkExtensions()
if ($PMA_Config !== null && empty($PMA_Config->getCookie('pma_lang')) && ! empty($GLOBALS['lang'])) {
$params['lang'] = $GLOBALS['lang'];
}

Expand Down

0 comments on commit fa8bada

Please sign in to comment.