File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -223,11 +223,15 @@ public function create( $_, $assoc_args ) {
223223 $ is_sqlite = self ::is_sqlite_integration_active ();
224224
225225 if ( ! $ is_sqlite ) {
226+ $ errors = [];
226227 if ( empty ( $ assoc_args ['dbname ' ] ) ) {
227- WP_CLI :: error ( ' Parameter errors: ' . PHP_EOL . 'missing --dbname parameter (Set the database name.) ' ) ;
228+ $ errors[] = 'missing --dbname parameter (Set the database name.) ' ;
228229 }
229230 if ( empty ( $ assoc_args ['dbuser ' ] ) ) {
230- WP_CLI ::error ( 'Parameter errors: ' . PHP_EOL . 'missing --dbuser parameter (Set the database user.) ' );
231+ $ errors [] = 'missing --dbuser parameter (Set the database user.) ' ;
232+ }
233+ if ( ! empty ( $ errors ) ) {
234+ WP_CLI ::error ( 'Parameter errors: ' . PHP_EOL . implode ( PHP_EOL , $ errors ) );
231235 }
232236 }
233237
You can’t perform that action at this time.
0 commit comments