diff --git a/admin/install.php b/admin/install.php index 0882f2c0..9988904a 100644 --- a/admin/install.php +++ b/admin/install.php @@ -64,7 +64,9 @@ function rt_wp_nginx_helper_remove_capability( $capability ) { foreach ( $check_order as $role ) { $role = get_role( $role ); - $role->remove_cap( $capability ); + if ($role) { + $role->remove_cap( $capability ); + } } } @@ -97,4 +99,4 @@ function rt_wp_nginx_helper_get_options() { return $rt_wp_nginx_helper_get_options; } -} \ No newline at end of file +}