1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

[ticket/17475] Fix MSSQL arithmetic overflow error on counting attachments size

PHPBB-17475
This commit is contained in:
rxu
2025-03-10 21:24:15 +07:00
parent 64dd8b668e
commit 14a6322b4f
4 changed files with 4 additions and 4 deletions

View File

@@ -1998,7 +1998,7 @@ function update_dynamic_config()
$config->set('num_files', (int) $db->sql_fetchfield('stat'), false);
$db->sql_freeresult($result);
$sql = 'SELECT SUM(filesize) as stat
$sql = 'SELECT SUM(' . $db->cast_expr_to_bigint('filesize') . ') as stat
FROM ' . ATTACHMENTS_TABLE . '
WHERE is_orphan = 0';
$result = $db->sql_query($sql);