bug #1405956, unitialized variable (link)

This commit is contained in:
Marc Delisle
2006-01-16 17:45:30 +00:00
parent 424bb0a12f
commit b0a89a0806
2 changed files with 4 additions and 2 deletions

View File

@@ -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 <cybot_tm@users.sourceforge.net>
* libraries/sql_query_form.lib.php: undefined js variable

View File

@@ -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