You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All previous phpmyadmin versions in the 4.9-branch have given no problems on this setup (I've simply reverted back to 4.9.7 for now). Using version 4.9.8 however throws this error: PHP Parse error: syntax error, unexpected '?' in ../phpmyadmin/libraries/classes/DatabaseInterface.php on line 1566. The line in question is $storageDbName = $GLOBALS['cfg']['Server']['pmadb'] ?? '';
Server configuration
Operating system: Debian Jessie
Web server: apache/2.4.10
Database version: MySQL 5.5.62
PHP version: 5.6.40
phpMyAdmin version: 4.9.8
Client configuration
Browsers: Firefox/Chrome/Edge
Operating system: Windows 10
Additional context
/**
* This function checks and initialises the phpMyAdmin configuration
* storage state before it is used into session cache.
*
* @return void
*/
public function initRelationParamsCache()
{
$storageDbName = $GLOBALS['cfg']['Server']['pmadb'] ?? '';
// Use "phpmyadmin" as a default database name to check to keep the behavior consistent
$storageDbName = $storageDbName !== null
&& is_string($storageDbName)
&& $storageDbName !== '' ? $storageDbName : 'phpmyadmin';
// This will make users not having explicitly listed databases
// have config values filled by the default phpMyAdmin storage table name values
$this->relation->fixPmaTables($storageDbName, false);
// This global will be changed if fixPmaTables did find one valid table
$storageDbName = $GLOBALS['cfg']['Server']['pmadb'] ?? '';
// Empty means that until now no pmadb was found eligible
if (empty($storageDbName)) {
$this->relation->fixPmaTables($GLOBALS['db'], false);
}
}
The text was updated successfully, but these errors were encountered:
Hi @aartsr.
Thank you for reporting this issue. This is a mistake that was introduced when we back-ported a fix into the 4.9.x branch.
As an immediate fix, you can change these lines to:
diff --git a/libraries/classes/DatabaseInterface.php b/libraries/classes/DatabaseInterface.php
index 7ab5d754fb..0edc297cd3 100644
--- a/libraries/classes/DatabaseInterface.php+++ b/libraries/classes/DatabaseInterface.php@@ -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)) {
Describe the bug
All previous phpmyadmin versions in the 4.9-branch have given no problems on this setup (I've simply reverted back to 4.9.7 for now). Using version 4.9.8 however throws this error: PHP Parse error: syntax error, unexpected '?' in ../phpmyadmin/libraries/classes/DatabaseInterface.php on line 1566. The line in question is $storageDbName = $GLOBALS['cfg']['Server']['pmadb'] ?? '';
Server configuration
Operating system: Debian Jessie
Web server: apache/2.4.10
Database version: MySQL 5.5.62
PHP version: 5.6.40
phpMyAdmin version: 4.9.8
Client configuration
Browsers: Firefox/Chrome/Edge
Operating system: Windows 10
Additional context
/**
* This function checks and initialises the phpMyAdmin configuration
* storage state before it is used into session cache.
*
* @return void
*/
public function initRelationParamsCache()
{
$storageDbName = $GLOBALS['cfg']['Server']['pmadb'] ?? '';
// Use "phpmyadmin" as a default database name to check to keep the behavior consistent
$storageDbName = $storageDbName !== null
&& is_string($storageDbName)
&& $storageDbName !== '' ? $storageDbName : 'phpmyadmin';
The text was updated successfully, but these errors were encountered: