Skip to content

Support CSV with spaces when using --fields=<fields>#2750

Merged
danielbachhuber merged 1 commit into
wp-cli:masterfrom
miya0001:fix-2711
May 15, 2016
Merged

Support CSV with spaces when using --fields=<fields>#2750
danielbachhuber merged 1 commit into
wp-cli:masterfrom
miya0001:fix-2711

Conversation

@miya0001
Copy link
Copy Markdown
Member

Bug fix #2711 and add test.

Thanks!

Comment thread php/WP_CLI/Formatter.php
$format_args['fields'] = explode( ',', $format_args['fields'] );
}

$format_args['fields'] = array_map( 'trim', $format_args['fields'] );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great placement for this fix :)

@danielbachhuber
Copy link
Copy Markdown
Member

Build fails on trunk because of #2744

@danielbachhuber danielbachhuber merged commit 0c87507 into wp-cli:master May 15, 2016
@danielbachhuber danielbachhuber changed the title fix #2711 Support CSV with spaces when using --fields=<fields> Jul 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

wp post list fails with "Invalid field" error if there's space after the comma separating the fields.

2 participants