Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Uncaught ArgumentCountError: Too few arguments to function WP_CLI::halt() #3242

Merged
merged 1 commit into from
Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix: Uncaught ArgumentCountError: Too few arguments to function WP_CL…
…I::halt()
  • Loading branch information
burhandodhy committed Jan 4, 2023
commit 245eee1e73ec969353c099792b8a9007c2bd4cd9
4 changes: 2 additions & 2 deletions includes/classes/Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ public function delete_transient_on_int( $signal_no ) {
if ( SIGINT === $signal_no ) {
$this->delete_transient();
WP_CLI::log( esc_html__( 'Indexing cleaned up.', 'elasticpress' ) );
WP_CLI::halt();
WP_CLI::halt( 0 );
}
}

Expand Down Expand Up @@ -1140,7 +1140,7 @@ public function should_interrupt_sync() {
if ( $should_interrupt_sync ) {
WP_CLI::line( esc_html__( 'Sync was interrupted', 'elasticpress' ) );
$this->delete_transient_on_int( 2 );
WP_CLI::halt();
WP_CLI::halt( 0 );
}
}

Expand Down
2 changes: 1 addition & 1 deletion tests/php/includes/classes/mock/class-wp-cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static function confirm( $message, $args = [] ) {
*
* @param integer $return_code Exit code to return.
*/
public static function halt( $return_code = 0 ) {
public static function halt( $return_code ) {
}

}