diff options
Diffstat (limited to 'phpBB/includes/db/mssql.php')
-rw-r--r-- | phpBB/includes/db/mssql.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/phpBB/includes/db/mssql.php b/phpBB/includes/db/mssql.php index 0345e4f8f8..8888bb3939 100644 --- a/phpBB/includes/db/mssql.php +++ b/phpBB/includes/db/mssql.php @@ -96,6 +96,7 @@ class dbal_mssql 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)' : ''; |