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

Support null value for custom attributes. #9314

Merged

Conversation

meng-tian
Copy link
Contributor

@meng-tian meng-tian commented Apr 19, 2017

Description

This pull request add null value support for custom attributes of web api. Previously, providing null value to custom attribute xyz will get exception Value is not set for attribute code xyz. The exception is caused by using !isset to examine whether a value exists. !isset return true when value is null.

With this pull request, !array_key_exists will be used instead of !isset. This makesnull value also work for custom attributes.

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@adragus-inviqa
Copy link
Contributor

Does this PR mean we'll be getting very large API responses, full of null values?

@meng-tian
Copy link
Contributor Author

@adragus-inviqa no, this PR only modified ServiceInputProcessor so it should not affect responses.

@maghamed maghamed self-requested a review April 21, 2017 09:27
@maghamed maghamed self-assigned this Apr 21, 2017
@ishakhsuvarov ishakhsuvarov self-assigned this Jun 23, 2017
@ishakhsuvarov ishakhsuvarov added this to the June 2017 milestone Jun 23, 2017
@magento-team magento-team merged commit 9e3ca7b into magento:develop Jun 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants