From 74d1b1812f512ae232a063a2574d62d3f5491f46 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Sat, 24 Jan 2015 21:35:17 +0100 Subject: [PATCH] [ticket/10748] Overwrite the type map correctly PHPBB3-10748 --- phpBB/phpbb/db/tools/mssql.php | 4 +++- phpBB/phpbb/db/tools/tools.php | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/phpBB/phpbb/db/tools/mssql.php b/phpBB/phpbb/db/tools/mssql.php index b4a09143eb..3a7ac6185d 100644 --- a/phpBB/phpbb/db/tools/mssql.php +++ b/phpBB/phpbb/db/tools/mssql.php @@ -117,6 +117,8 @@ class mssql extends tools $this->sql_layer = 'mssqlnative'; break; } + + $this->dbms_type_map = self::get_dbms_type_map(); } /** @@ -344,7 +346,7 @@ class mssql extends tools } // Get type - list($column_type, $orig_column_type) = $this->get_column_type($column_data[0]); + list($column_type, ) = $this->get_column_type($column_data[0]); // Adjust default value if db-dependent specified if (is_array($column_data[1])) diff --git a/phpBB/phpbb/db/tools/tools.php b/phpBB/phpbb/db/tools/tools.php index f05c690e5f..d2bad21a3a 100644 --- a/phpBB/phpbb/db/tools/tools.php +++ b/phpBB/phpbb/db/tools/tools.php @@ -1354,6 +1354,7 @@ class tools implements tools_interface */ function get_column_type($column_map_type) { + $column_type = ''; if (strpos($column_map_type, ':') !== false) { list($orig_column_type, $column_length) = explode(':', $column_map_type);