Skip to content

Commit fea9524

Browse files
swissspidyCopilot
andauthored
Potential fix for pull request finding
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1 parent 7d6afea commit fea9524

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/Search_Replace_Command.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,7 @@ public function __invoke( $args, $assoc_args ) {
469469
$views_args = $assoc_args;
470470
$views_args['views-only'] = true;
471471
$views = Utils\wp_get_table_names( [], $views_args );
472+
$view_set = array_flip( array_intersect( $views, $tables ) );
472473

473474
foreach ( $tables as $table ) {
474475
foreach ( $this->skip_tables as $skip_table ) {
@@ -477,7 +478,7 @@ public function __invoke( $args, $assoc_args ) {
477478
}
478479
}
479480

480-
if ( in_array( $table, $views, true ) ) {
481+
if ( isset( $view_set[ $table ] ) ) {
481482
if ( $this->report && ! $this->report_changed_only ) {
482483
$report[] = array( $table, '', 'skipped (view)', '' );
483484
}

0 commit comments

Comments
 (0)