diff options
Diffstat (limited to 'phpBB/includes/db/mssql_odbc.php')
-rw-r--r-- | phpBB/includes/db/mssql_odbc.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/phpBB/includes/db/mssql_odbc.php b/phpBB/includes/db/mssql_odbc.php index 07da14bd53..a14d6adb14 100644 --- a/phpBB/includes/db/mssql_odbc.php +++ b/phpBB/includes/db/mssql_odbc.php @@ -114,6 +114,7 @@ class dbal_mssql_odbc extends dbal */ function sql_case($condition, $action_true, $action_false = false) { + // To ensure, that both expressions have the same type, we cast them to varchar manually $sql_case = 'CASE WHEN ' . $condition; $sql_case .= ' THEN CAST(' . $action_true . ' AS VARCHAR)'; $sql_case .= ($action_false !== false) ? ' ELSE CAST(' . $action_false . ' AS VARCHAR)' : ''; |