Skip to content

Commit f33cacc

Browse files
committed
Fix typing bug in site management code
1 parent ec25ca5 commit f33cacc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Site_Command.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,8 @@ public function set_private( $args ) {
775775
}
776776

777777
private function update_site_status( $ids, $pref, $value ) {
778+
$value = (int) $value;
779+
778780
switch ( $pref ) {
779781
case 'archived':
780782
$action = $value ? 'archived' : 'unarchived';
@@ -801,7 +803,7 @@ private function update_site_status( $ids, $pref, $value ) {
801803
continue;
802804
}
803805

804-
$old_value = get_blog_status( $site->blog_id, $pref );
806+
$old_value = (int) get_blog_status( $site->blog_id, $pref );
805807

806808
if ( $value === $old_value ) {
807809
WP_CLI::warning( "Site {$site->blog_id} already {$action}." );

0 commit comments

Comments
 (0)