Skip to content

Commit fb17561

Browse files
author
alpipego
committed
reverse order of arguments, to keep bc
1 parent 4682304 commit fb17561

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Search_Replace_Command.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ private function php_export_table( $table, $old, $new ) {
412412
'chunk_size' => $chunk_size
413413
);
414414

415-
$replacer = new \WP_CLI\SearchReplacer( $old, $new, $this->recurse_objects, $this->regex, $this->regex_flags, $this->regex_delimiter, $this->regex_limit );
415+
$replacer = new \WP_CLI\SearchReplacer( $old, $new, $this->recurse_objects, $this->regex, $this->regex_flags, $this->regex_delimiter, false, $this->regex_limit );
416416
$col_counts = array_fill_keys( $all_columns, 0 );
417417
if ( $this->verbose && 'table' === $this->format ) {
418418
$this->start_time = microtime( true );
@@ -486,7 +486,7 @@ private function php_handle_col( $col, $primary_keys, $table, $old, $new ) {
486486
global $wpdb;
487487

488488
$count = 0;
489-
$replacer = new \WP_CLI\SearchReplacer( $old, $new, $this->recurse_objects, $this->regex, $this->regex_flags, $this->regex_delimiter, $this->regex_limit, null !== $this->log_handle );
489+
$replacer = new \WP_CLI\SearchReplacer( $old, $new, $this->recurse_objects, $this->regex, $this->regex_flags, $this->regex_delimiter, null !== $this->log_handle, $this->regex_limit );
490490

491491
$table_sql = self::esc_sql_ident( $table );
492492
$col_sql = self::esc_sql_ident( $col );

src/WP_CLI/SearchReplacer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class SearchReplacer {
2424
* @param integer $regex_limit The maximum possible replacements for each pattern in each subject string.
2525
* @param bool $logging Whether logging.
2626
*/
27-
function __construct( $from, $to, $recurse_objects = false, $regex = false, $regex_flags = '', $regex_delimiter = '/', $regex_limit = -1, $logging = false ) {
27+
function __construct( $from, $to, $recurse_objects = false, $regex = false, $regex_flags = '', $regex_delimiter = '/', $logging = false, $regex_limit = -1 ) {
2828
$this->from = $from;
2929
$this->to = $to;
3030
$this->recurse_objects = $recurse_objects;

0 commit comments

Comments
 (0)