Skip to content

Fixed "Undefined index: @type" for resource non-empty array fields #97

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

Merged

Conversation

hainovsky
Copy link
Contributor

On serialization there could be exception "Notice: Undefined index: @type" for root resource non-empty array fields.

It happens due to the fact that we're iterating over all object/resource fields (including array fields) in setResponseDataIncluded and then directly refer to "@type" key in array:2 [▼ "@scalar" => "string" "@value" => "sale" ]

@nilportugues nilportugues merged commit 72684da into nilportugues:master Jul 19, 2018
@nilportugues
Copy link
Owner

@ksxauh awesome, thanks for finding this and providing a PR 👍

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.

3 participants