From b0a89a0806132af2fca6b6f6e4035df58ca9dcd9 Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Mon, 16 Jan 2006 17:45:30 +0000 Subject: [PATCH] bug #1405956, unitialized variable (link) --- ChangeLog | 2 ++ libraries/common.lib.php | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0eff45684..5268c3387 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10,6 +10,8 @@ $Source$ * libraries/check_user_privileges.lib.php: bug #1406499, a username containing an hyphen could not create a db under MySQL 4.0.x, thanks to "timeout-" + * libraries/common.lib.php: bug #1405956, unitialized variable $link, + thanks to Sebastian Mendel 2006-01-14 Sebastian Mendel * libraries/sql_query_form.lib.php: undefined js variable diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 1ebf5ca14..fe789ffcb 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -991,10 +991,10 @@ if (!defined('PMA_MINIMUM_COMMON')) { global $cfg; // 1. A list of allowed databases has already been defined by the - // authentification process -> gets the available databases list + // authentication process -> gets the available databases list if (count($dblist)) { foreach ($dblist as $key => $db) { - if (!@PMA_DBI_select_db($db, $link) || (!empty($GLOBALS['cfg']['Server']['hide_db']) && preg_match('/' . $GLOBALS['cfg']['Server']['hide_db'] . '/', $db))) { + if (!@PMA_DBI_select_db($db) || (!empty($GLOBALS['cfg']['Server']['hide_db']) && preg_match('/' . $GLOBALS['cfg']['Server']['hide_db'] . '/', $db))) { unset($dblist[$key]); } // end if } // end for