From 2af02bc0a00e1858e9aa51307ef26a0d2825b844 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Fri, 17 Mar 2006 14:29:29 +0000 Subject: [PATCH] undefined variable cfg nopassword in mysqli --- ChangeLog | 5 +++++ libraries/dbi/mysqli.dbi.lib.php | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b440343d9..5ff727ce9 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,11 @@ phpMyAdmin - Changelog $Id$ $Source$ +2006-03-17 Marc Delisle + * libraries/dbi/mysqli.dbi.lib.php: if $cfg['Servers'][$i]['nopassword'] + is not defined (using an older config.inc.php), an error is displayed + when login fails + 2006-03-17 Michal Čihař * scripts/setup.php: Allow empty socket (bug #1452142). diff --git a/libraries/dbi/mysqli.dbi.lib.php b/libraries/dbi/mysqli.dbi.lib.php index 5594ea0c2..7726edb8c 100644 --- a/libraries/dbi/mysqli.dbi.lib.php +++ b/libraries/dbi/mysqli.dbi.lib.php @@ -92,7 +92,7 @@ function PMA_DBI_connect($user, $password, $is_controluser = false) $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 - if ($return_value == false && $cfg['Server']['nopassword'] && !$is_controluser) { + if ($return_value == false && isset($cfg['Server']['nopassword']) && $cfg['Server']['nopassword'] && !$is_controluser) { $return_value = @mysqli_real_connect($link, $GLOBALS['cfg']['Server']['host'], $user, '', false, $server_port, $server_socket, $client_flags); }