Skip to content

Commit e8bd6ab

Browse files
committed
Fix implicit casts
1 parent 1be78f3 commit e8bd6ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

includes/wp-cli/class-orchestrate-sites.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public function list() {
5151
}
5252

5353
$id = array_search( gethostname(), $hosts, true );
54-
$this->display_sites( $num_groups, $id % $num_groups );
54+
$this->display_sites( $num_groups, (int) ( $id % $num_groups ) );
5555
}
5656

5757
/**
@@ -70,7 +70,7 @@ private function display_sites( $num_groups = 1, $group = 0 ) {
7070
$all_sites = get_sites( [ 'number' => self::MAX_SITES ] );
7171
$sites_to_display = [];
7272
foreach ( $all_sites as $index => $site ) {
73-
if ( ! ( $index % $num_groups === $group ) ) {
73+
if ( ! ( (int) $index % $num_groups === $group ) ) {
7474
// The site does not belong to this group.
7575
continue;
7676
}

0 commit comments

Comments
 (0)