Skip to content

Commit

Permalink
Merge pull request #152 from szepeviktor/patch-2
Browse files Browse the repository at this point in the history
Fix exit after WP_CLI::error
  • Loading branch information
roborourke authored Jul 25, 2024
2 parents 2d4e2e3 + 95e49f3 commit c8040c5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions inc/cli/class-migrate-command.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ function ppa( $args, $assoc_args ) : void {
// Usually invalid taxonomy, lets catch and report this.
if ( is_wp_error( $ppa_terms ) ) {
WP_CLI::error( 'There was an error fetching the PublishPress Author data, is the plugin activated?', false );
WP_CLI::error( $ppa_terms );
exit;
WP_CLI::error( $ppa_terms, false );
exit( 1 );
}

/**
Expand Down Expand Up @@ -361,9 +361,9 @@ private function get_ppa_user_id( WP_Term $ppa_author, bool $create_users = fals
// If this fails we want the debug data, so print out the
// arguments so we can reproduce later.
if ( is_wp_error( $ppa_user_id ) ) {
WP_CLI::error( 'Could not create Authorship user with these arguments:' );
WP_CLI::error( $ppa_user_id );
return -1;
WP_CLI::error( 'Could not create Authorship user with these arguments:', false );
WP_CLI::error( $ppa_user_id, false );
exit( 1 );
}

return $ppa_user_id;
Expand Down

0 comments on commit c8040c5

Please sign in to comment.