mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-30 23:30:05 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user