Fix syntax error for PHP 5

Fixes #17305
Fixes #17306

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
This commit is contained in:
Maurício Meneghini Fauth 2022-01-22 11:34:10 -03:00
parent d8515f83ba
commit e2b4dda2e9
No known key found for this signature in database
GPG Key ID: 6A16FD38AFC89CC8
4 changed files with 13 additions and 2 deletions

1
.gitignore vendored
View File

@ -59,3 +59,4 @@ composer.lock
/node_modules/
libraries/cache/
js/dist/
/setup/styles.css.map

View File

@ -1,6 +1,9 @@
phpMyAdmin - ChangeLog
======================
4.9.9 (not yet released)
- issue #17305 Fix syntax error for PHP 5
4.9.8 (2022-01-20)
- issue #14321 Display a correct error page when "$cfg['Servers'][$i]['SignonURL']" is empty for auth_type=signon
- issue #14321 [security] Remove leaked HTML on signon page redirect before login for auth_type=signon

View File

@ -102,5 +102,12 @@
"phpcs",
"phpunit --color=always"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true,
"phpstan/extension-installer": true,
"composer/package-versions-deprecated": true
}
}
}

View File

@ -1563,7 +1563,7 @@ class DatabaseInterface
*/
public function initRelationParamsCache()
{
$storageDbName = $GLOBALS['cfg']['Server']['pmadb'] ?? '';
$storageDbName = isset($GLOBALS['cfg']['Server']['pmadb']) ? $GLOBALS['cfg']['Server']['pmadb'] : '';
// Use "phpmyadmin" as a default database name to check to keep the behavior consistent
$storageDbName = $storageDbName !== null
&& is_string($storageDbName)
@ -1574,7 +1574,7 @@ class DatabaseInterface
$this->relation->fixPmaTables($storageDbName, false);
// This global will be changed if fixPmaTables did find one valid table
$storageDbName = $GLOBALS['cfg']['Server']['pmadb'] ?? '';
$storageDbName = isset($GLOBALS['cfg']['Server']['pmadb']) ? $GLOBALS['cfg']['Server']['pmadb'] : '';
// Empty means that until now no pmadb was found eligible
if (empty($storageDbName)) {