Ticket #23626: 23626.2.patch
File 23626.2.patch, 781 bytes (added by , 12 years ago) |
---|
-
wp-includes/deprecated.php
3378 3378 function wp_convert_bytes_to_hr( $bytes ) { 3379 3379 _deprecated_function( __FUNCTION__, '3.6', 'size_format()' ); 3380 3380 3381 $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB' );3381 $units = array( 0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB' ); 3382 3382 $log = log( $bytes, 1024 ); 3383 3383 $power = (int) $log; 3384 $size = pow( 1024, $log - $power ); 3384 3385 3385 if ( array_key_exists( $power, $units ) ) { 3386 $size = pow( 1024, $log - $power ); 3386 if ( ! is_nan( $size ) && array_key_exists( $power, $units ) ) { 3387 3387 $unit = $units[ $power ]; 3388 3388 } else { 3389 3389 $size = $bytes;