From dcead64385dccaae82a3f8e7023124147fc6ab45 Mon Sep 17 00:00:00 2001 From: scribu Date: Tue, 1 Oct 2013 18:42:18 +0300 Subject: [PATCH] let format_items() handle case where fields aren't set, for now --- php/WP_CLI/Formatter.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/php/WP_CLI/Formatter.php b/php/WP_CLI/Formatter.php index 65cf8781..d9c5c029 100644 --- a/php/WP_CLI/Formatter.php +++ b/php/WP_CLI/Formatter.php @@ -32,10 +32,8 @@ class Formatter { public function display_items( $items ) { if ( $this->args['field'] ) { self::show_single_field( $items, $this->args['field'], $this->args['format'], $this->prefix ); - } elseif ( $this->args['fields'] ) { - \WP_CLI\Utils\format_items( $this->args['format'], $items, $this->args['fields'] ); } else { - trigger_error( 'Both --field= and --fields= parameters are missing.', E_USER_ERROR ); + \WP_CLI\Utils\format_items( $this->args['format'], $items, $this->args['fields'] ); } } -- 2.11.0