mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 09:37:42 +01:00
doubleval bytes. Props tellyworth. fixes #5246
git-svn-id: http://svn.automattic.com/wordpress/trunk@6669 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
2ac5c0204f
commit
80643d6ed9
@ -103,8 +103,10 @@ function size_format( $bytes, $decimals = null ) {
|
||||
);
|
||||
|
||||
foreach ( $quant as $unit => $mag )
|
||||
if ( intval( $bytes ) >= $mag )
|
||||
if ( doubleval($bytes) >= $mag )
|
||||
return number_format_i18n( $bytes / $mag, $decimals ) . ' ' . $unit;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user