initialize in case there are no databases (MySQL < 5.0)

This commit is contained in:
Marc Delisle
2005-11-18 13:36:25 +00:00
parent a0b56956a0
commit 1d7831c153
2 changed files with 9 additions and 1 deletions

View File

@@ -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() {
}
}
?>
?>