doubleval bytes. Props tellyworth. fixes #5246
git-svn-id: https://develop.svn.wordpress.org/trunk@6669 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
14be0c9816
commit
a8eb580138
@ -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