bug [mysqli] non-global $cfg referenced where $GLOBAL['cfg'] expected

This commit is contained in:
Will Palmer
2010-08-04 09:32:58 +01:00
committed by Marc Delisle
parent fd1d214d35
commit 158517d764

View File

@@ -110,9 +110,8 @@ function PMA_DBI_connect($user, $password, $is_controluser = false, $server = nu
if (!$server) { if (!$server) {
$return_value = @mysqli_real_connect($link, $GLOBALS['cfg']['Server']['host'], $user, $password, false, $server_port, $server_socket, $client_flags); $return_value = @mysqli_real_connect($link, $GLOBALS['cfg']['Server']['host'], $user, $password, false, $server_port, $server_socket, $client_flags);
// Retry with empty password if we're allowed to // Retry with empty password if we're allowed to
if ($return_value == false && isset($cfg['Server']['nopassword']) && $cfg['Server']['nopassword'] && !$is_controluser) { if ($return_value == false && isset($GLOBALS['cfg']['Server']['nopassword']) && $GLOBALS['cfg']['Server']['nopassword'] && !$is_controluser) {
$return_value = @mysqli_real_connect($link, $GLOBALS['cfg']['Server']['host'], $user, '', false, $server_port, $server_socket, $client_flags); $return_value = @mysqli_real_connect($link, $GLOBALS['cfg']['Server']['host'], $user, '', false, $server_port, $server_socket, $client_flags);
} }
} else { } else {