WordPress.org

Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#5246 closed defect (bug) (fixed)

size_format doesn't work for TB

Reported by: nbachiyski Owned by:
Milestone: 2.5 Priority: normal
Severity: normal Version:
Component: General Keywords: size_format has-patch
Focuses: Cc:

Description

size_format runs the number through int_val, which casts it to int, which is usually only 32 bits. Not enough for terabytes.

Attachments (2)

size_format.diff (1.5 KB) - added by nbachiyski 6 years ago.
size_format_double-r6350.patch (457 bytes) - added by tellyworth 6 years ago.
simpler patch with doubleval()

Download all attachments as: .zip

Change History (5)

nbachiyski6 years ago

tellyworth6 years ago

simpler patch with doubleval()

comment:1 tellyworth6 years ago

Simpler patch included - this one just uses doubleval() in place of intval().

Both pass unit tests incidentally - see test_size_format() in http://svn.automattic.com/wordpress-tests/wp-testcase/test_includes_functions.php.

comment:2 darkdragon6 years ago

Can this go in?

comment:3 ryan6 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [6669]) doubleval bytes. Props tellyworth. fixes #5246

Note: See TracTickets for help on using tickets.