WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/05/2016 10:35:24 AM (5 years ago)
Author:
ocean90
Message:

General: Return "O B" when passing 0 to size_format().

Props swissspidy.
Fixes #36635.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/functions.php

    r37944 r37962  
    263263        'B'  => 1,
    264264    );
     265
     266    if ( 0 === $bytes ) {
     267        return number_format_i18n( 0, $decimals ) . ' B';
     268    }
    265269
    266270    foreach ( $quant as $unit => $mag ) {
Note: See TracChangeset for help on using the changeset viewer.