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:
ryan 2008-01-28 04:55:54 +00:00
parent 2ac5c0204f
commit 80643d6ed9

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