Skip to content

Commit fa2545f

Browse files
authored
Merge branch 'main' into copilot/add-wp-db-status-command
2 parents d2e9c27 + a959fd3 commit fa2545f

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
branches:
77
- main
88
- master
9+
schedule:
10+
- cron: '17 2 * * *' # Run every day on a seemly random time.
911

1012
jobs:
1113
code-quality:

src/DB_Command.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,6 +1161,12 @@ public function size( $args, $assoc_args ) {
11611161
$size_key = floor( log( (float) $row['Size'] ) / log( 1000 ) );
11621162
$sizes = [ 'B', 'KB', 'MB', 'GB', 'TB' ];
11631163

1164+
if ( is_infinite( $size_key ) ) {
1165+
$size_key = 0;
1166+
}
1167+
1168+
$size_key = (int) $size_key;
1169+
11641170
$size_format = isset( $sizes[ $size_key ] ) ? $sizes[ $size_key ] : $sizes[0];
11651171
}
11661172

0 commit comments

Comments
 (0)