diff --git a/src/Config_Command.php b/src/Config_Command.php index 4b38bfa4..b9961457 100644 --- a/src/Config_Command.php +++ b/src/Config_Command.php @@ -165,7 +165,7 @@ public function create( $_, $assoc_args ) { try { mysqli_real_connect( $mysql, $assoc_args['dbhost'], $assoc_args['dbuser'], $assoc_args['dbpass'] ); } catch ( mysqli_sql_exception $exception ) { - die( 'Database connection error (' . $exception->getCode() . ') ' . $exception->getMessage() ); + WP_CLI::error( 'Database connection error (' . $exception->getCode() . ') ' . $exception->getMessage() ); } // phpcs:enable WordPress.DB.RestrictedFunctions }