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

Structure Type expects Setter during Unmarshalling? #4

Open
kjordan2001 opened this issue Sep 29, 2012 · 1 comment
Open

Structure Type expects Setter during Unmarshalling? #4

kjordan2001 opened this issue Sep 29, 2012 · 1 comment

Comments

@kjordan2001
Copy link

I have a collection of objects similar to the Collection object in the Books example on the website, however it crashes when it gets to unmarshalling it since it seems to think a setter is required for structure types. I believe the code fix should be:
$setter = $ast->getSetMethod();
if ($setter != null) {
$parentObject->$setter( $parsedObject );
} else {
return $parsedObject; //No setter, so something else must be doing something with it, like putting it in a collection.
}

@kjordan2001
Copy link
Author

And actually that may need to be $newObject since sometimes $parsedObject is null but $newObject is still fully populated.

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

No branches or pull requests

1 participant