Details
-
Bug
-
Status: Closed (View Workflow)
-
Resolution: Fixed
-
3.0.x
-
None
-
None
-
PHP Environment:
Database:
Description
In ./includes/functions_admin.php, on line 2375, there's this check:
if (is_int($dbsize))
|
{
|
$dbsize = ($dbsize >= 1048576) ? sprintf('%.2f ' . $user->lang['MB'], ($dbsize / 1048576)) : (($dbsize >= 1024) ? sprintf('%.2f ' . $user->lang['KB'], ($dbsize / 1024)) : sprintf('%.2f ' . $user->lang['BYTES'], $dbsize));
|
}
|
The problem with this check is that once a database gets past 2147483647 bytes (exactly 2GB), the datatype becomes a float to handle the resulting number. This means that past 2GB, your database size will be reported in bytes, which doesn't look good.
The solution is a tiny change, the if-statement should look something like:
if (is_int($dbsize) || is_float($dbsize))
|
If you need justification for this bug, consider that phpBB 3.0 is designed to operate better on larger databases than 2.0.x (which incidently suffers the same bug..). I think reporting that fact correctly to the admin would help
NeoThermic