From f37a935203fa300149d9e319a1aa55d7c3a41cbc Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Sun, 8 Feb 2009 13:31:58 +0000 Subject: [PATCH] bug #2568054 for numeric db name --- libraries/database_interface.lib.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index 9956198be..7e5ad4540 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -456,7 +456,10 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals // Note: I don't see why we would need array_merge_recursive() here, // as it creates double entries for the same table (for example a double // entry for Comment when changing the storage engine in Operations) - PMA_Table::$cache = array_merge(PMA_Table::$cache, $tables); + // Note 2: Instead of array_merge(), simply use the + operator because + // array_merge() renumbers numeric keys starting with 0, therefore + // we would lose a db name thats consists only of numbers + PMA_Table::$cache = PMA_Table::$cache + $tables; if (! is_array($database)) { if (isset($tables[$database])) {