Skip to content

Commit 0481029

Browse files
cjhaasschlessera
authored andcommitted
Pass empty string for default value to get_flag_value when passing to explode
See #168
1 parent 8614af9 commit 0481029

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Search_Replace_Command.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,9 +223,9 @@ public function __invoke( $args, $assoc_args ) {
223223
}
224224
}
225225

226-
$this->skip_columns = explode( ',', Utils\get_flag_value( $assoc_args, 'skip-columns' ) );
227-
$this->skip_tables = explode( ',', Utils\get_flag_value( $assoc_args, 'skip-tables' ) );
228-
$this->include_columns = array_filter( explode( ',', Utils\get_flag_value( $assoc_args, 'include-columns' ) ) );
226+
$this->skip_columns = explode( ',', Utils\get_flag_value( $assoc_args, 'skip-columns', '' ) );
227+
$this->skip_tables = explode( ',', Utils\get_flag_value( $assoc_args, 'skip-tables', '' ) );
228+
$this->include_columns = array_filter( explode( ',', Utils\get_flag_value( $assoc_args, 'include-columns', '' ) ) );
229229

230230
if ( $old === $new && ! $this->regex ) {
231231
WP_CLI::warning( "Replacement value '{$old}' is identical to search value '{$new}'. Skipping operation." );

0 commit comments

Comments
 (0)