Commit bf899f31 authored by Erick Hitter's avatar Erick Hitter
Browse files

Improve error output, as it's currently a guessing game about what's wrong

parent 6f4dea80
...@@ -48,8 +48,16 @@ class Orchestrate_Runner extends \WP_CLI_Command { ...@@ -48,8 +48,16 @@ class Orchestrate_Runner extends \WP_CLI_Command {
$action = \WP_CLI\Utils\get_flag_value( $assoc_args, 'action', null ); $action = \WP_CLI\Utils\get_flag_value( $assoc_args, 'action', null );
$instance = \WP_CLI\Utils\get_flag_value( $assoc_args, 'instance', null ); $instance = \WP_CLI\Utils\get_flag_value( $assoc_args, 'instance', null );
if ( ! is_numeric( $timestamp ) || ! is_string( $action ) || ! is_string( $instance ) ) { if ( ! is_numeric( $timestamp ) ) {
\WP_CLI::error( __( 'Invalid event arguments', 'automattic-cron-control' ) ); \WP_CLI::error( __( 'Invalid timestamp', 'automattic-cron-control' ) );
}
if ( ! is_string( $action ) ) {
\WP_CLI::error( __( 'Invalid action', 'automattic-cron-control' ) );
}
if( ! is_string( $instance ) ) {
\WP_CLI::error( __( 'Invalid instance', 'automattic-cron-control' ) );
} }
// Prepare environment // Prepare environment
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment