Skip to content

Commit 2a5c428

Browse files
committed
Fix issue after merge
1 parent b71179a commit 2a5c428

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/Search_Replace_Command.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,15 +820,18 @@ private function php_handle_col( $col, $primary_keys, $table, $old, $new, $addit
820820
$col_sql = self::esc_sql_ident( $col );
821821

822822
$base_key_condition = $additional_where;
823+
$where_key = '';
824+
823825
if ( ! $this->regex ) {
824826
$old_json = self::json_encode_strip_quotes( $old );
825827
$base_key_condition = "$col_sql" . $wpdb->prepare( ' LIKE BINARY %s', '%' . self::esc_like( $old ) . '%' );
826828
if ( $old_json !== $old ) {
827829
$base_key_condition = "( $base_key_condition OR $col_sql" . $wpdb->prepare( ' LIKE BINARY %s', '%' . self::esc_like( $old_json ) . '%' ) . ' )';
828830
}
831+
832+
$where_key = $base_key_condition ? ' WHERE ' . implode( ' AND ', $base_key_condition ) : '';
829833
}
830834

831-
$where_key = $base_key_condition ? ' WHERE ' . implode( ' AND ', $base_key_condition ) : '';
832835
$escaped_primary_keys = self::esc_sql_ident( $primary_keys );
833836
$primary_keys_sql = implode( ',', $escaped_primary_keys );
834837
$order_by_keys = array_map(

0 commit comments

Comments
 (0)