diff --git a/ChangeLog b/ChangeLog index 49f1976c5..71bda5f16 100755 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,10 @@ phpMyAdmin - Changelog $Id$ $Source$ +2005-11-18 Marc Delisle + * libraries/database_interface.lib.php: initialize in case there are + no databases (MySQL < 5.0) + 2005-11-18 Sebastian Mendel * server_databases.php: - require_once common.lib.php BEFORE ANYTHING else diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index 7d677c456..f1f245b1d 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -369,6 +369,10 @@ function PMA_DBI_get_tables_full( $database, $table = false, * @return array $databases */ function PMA_DBI_get_databases_full( $database = NULL, $force_stats = false, $link = NULL ) { + + // initialize to avoid errors when there are no databases + $databases = array(); + if ( PMA_MYSQL_INT_VERSION >= 50002 ) { // get table information from information_schema if ( $database ) { @@ -809,4 +813,4 @@ function PMA_DBI_get_default_engine() { } } -?> \ No newline at end of file +?>