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:
Ryan Boren 2008-01-28 04:55:54 +00:00
parent 14be0c9816
commit a8eb580138
1 changed files with 3 additions and 1 deletions

View File

@ -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;
}