aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--phpBB/includes/functions.php2
-rw-r--r--tests/functions/get_formatted_filesize_test.php16
2 files changed, 1 insertions, 17 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 33545ab845..8688ba3f7e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -289,7 +289,7 @@ function phpbb_gmgetdate($time = false)
/**
* Return formatted string for filesizes
*
-* @param int $value filesize in bytes
+* @param int $value filesize in bytes (non-negative number)
* @param bool $string_only true if language string should be returned
* @param array $allowed_units only allow these units (data array indexes)
*
diff --git a/tests/functions/get_formatted_filesize_test.php b/tests/functions/get_formatted_filesize_test.php
index 88866f90ac..c4793e8073 100644
--- a/tests/functions/get_formatted_filesize_test.php
+++ b/tests/functions/get_formatted_filesize_test.php
@@ -30,18 +30,10 @@ class phpbb_get_formatted_filesize_test extends phpbb_test_case
array(0, '0 BYTES'),
array(2, '2 BYTES'),
- array(-2, '-2 BYTES'),
array(1023, '1023 BYTES'),
array(1025, '1 KIB'),
- array(-1023, '-1023 BYTES'),
- array(-1025, '-1025 BYTES'),
-
array(1048575, '1024 KIB'),
-
- // large negatives
- array(-1073741824, '-1073741824 BYTES'),
- array(-1099511627776, '-1099511627776 BYTES'),
);
}
@@ -64,18 +56,10 @@ class phpbb_get_formatted_filesize_test extends phpbb_test_case
array('0', '0 BYTES'),
array('2', '2 BYTES'),
- array('-2', '-2 BYTES'),
array('1023', '1023 BYTES'),
array('1025', '1 KIB'),
- array('-1023', '-1023 BYTES'),
- array('-1025', '-1025 BYTES'),
-
array('1048575', '1024 KIB'),
-
- // large negatives
- array('-1073741824', '-1073741824 BYTES'),
- array('-1099511627776', '-1099511627776 BYTES'),
);
}