Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PHP notice when calling `wp export` with --category parameter #1568

Merged

Conversation

@rodrigoprimo
Copy link
Contributor

rodrigoprimo commented Dec 15, 2014

When using wp export with --category parameter I was getting the PHP notice below:

PHP Notice: Trying to get property of non-object in php/export/class-wp-export-wxr-formatter.php on line 117

This resulted in several empty <wp:category> tags in the generated file. To fix it I had to revert a change made in aa27fd9 which I'm not sure if it was intentional or not.

@danielbachhuber

This comment has been minimized.

Copy link
Member

danielbachhuber commented Dec 15, 2014

Thanks @rodrigoprimo. I'll take a look this week.

@danielbachhuber

This comment has been minimized.

Copy link
Member

danielbachhuber commented Dec 16, 2014

To fix it I had to revert a change made in aa27fd9 which I'm not sure if it was intentional or not.

This must be a bug in the upstream patch. Can you report on the ticket? https://core.trac.wordpress.org/ticket/22435#comment:38

danielbachhuber added a commit that referenced this pull request Dec 16, 2014
Fix PHP notice when calling `wp export` with --category parameter
@danielbachhuber danielbachhuber merged commit b874078 into wp-cli:master Dec 16, 2014
1 check passed
1 check passed
continuous-integration/travis-ci The Travis CI build passed
Details
@rodrigoprimo rodrigoprimo deleted the rodrigoprimo:fix-export-posts-by-category branch Dec 17, 2014
@rodrigoprimo

This comment has been minimized.

Copy link
Contributor Author

rodrigoprimo commented Dec 17, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.