Changeset 8045
- Timestamp:
- 01/08/2019 06:50:03 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/api/routes/class-internal-stats.php
r6287 r8045 150 150 } 151 151 152 // Due to rounding issues, sometimes we'll end up with the total being .01 or .02 off 100 153 // In these cases, we'll just alter the 'other' or final number slightly so everything adds up to 100. 154 // This is ultimately needed for the stats graphs to display properly. 155 if ( array_sum( $usage ) != 100.00 ) { 156 $last_key = array_keys( $usage )[ count( $usage ) - 1 ]; 157 $usage[ $last_key ] -= array_sum( $usage ) - 100.00; 158 } 159 152 160 return $usage; 153 161 }
Note: See TracChangeset
for help on using the changeset viewer.