Skip to content

Commit

Permalink
Fix hide_connection_errors being undefined when a controluser is set
Browse files Browse the repository at this point in the history
Fixes #17307
Closes #17304

Signed-off-by: Maurício Meneghini Fauth <mauricio@fauth.dev>
  • Loading branch information
MauricioFauth committed Jan 22, 2022
1 parent e2b4dda commit fd692ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Expand Up @@ -3,6 +3,7 @@ phpMyAdmin - ChangeLog

4.9.9 (not yet released)
- issue #17305 Fix syntax error for PHP 5
- issue #17307 Fix hide_connection_errors being undefined when a controluser is set

4.9.8 (2022-01-20)
- issue #14321 Display a correct error page when "$cfg['Servers'][$i]['SignonURL']" is empty for auth_type=signon
Expand Down
6 changes: 6 additions & 0 deletions libraries/classes/DatabaseInterface.php
Expand Up @@ -2427,6 +2427,8 @@ public function getConnectionParams($mode, $server = null)

$server = array();

$server['hide_connection_errors'] = $cfg['Server']['hide_connection_errors'];

if (! empty($cfg['Server']['controlhost'])) {
$server['host'] = $cfg['Server']['controlhost'];
} else {
Expand Down Expand Up @@ -2486,6 +2488,10 @@ public function getConnectionParams($mode, $server = null)
$server['compress'] = false;
}

if (! isset($server['hide_connection_errors'])) {
$server['hide_connection_errors'] = false;
}

return array($user, $password, $server);
}

Expand Down

0 comments on commit fd692ca

Please sign in to comment.