Skip to content

Commit d5cfaef

Browse files
Remove unused variable from the file.
1 parent b69c9a8 commit d5cfaef

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Rewrite_Command.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,13 @@ public function structure( $args, $assoc_args ) {
160160

161161
// Launch a new process to flush rewrites because core expects flush
162162
// to happen after rewrites are set
163-
$new_assoc_args = [];
163+
164164
$cmd = 'rewrite flush';
165165
if ( Utils\get_flag_value( $assoc_args, 'hard' ) ) {
166166
$cmd .= ' --hard';
167-
$new_assoc_args['hard'] = true;
167+
168+
// Check if the 'mod_rewrite' Apache module is enabled.
169+
// If not, display a warning since regenerating the .htaccess file requires this module.
168170
if ( ! in_array( 'mod_rewrite', (array) WP_CLI::get_config( 'apache_modules' ), true ) ) {
169171
WP_CLI::warning( 'Regenerating a .htaccess file requires special configuration. See usage docs.' );
170172
}

0 commit comments

Comments
 (0)