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

_getEmbRes throws fatal error when it can't find self #15

Open
logistiker opened this issue Aug 29, 2013 · 2 comments
Open

_getEmbRes throws fatal error when it can't find self #15

logistiker opened this issue Aug 29, 2013 · 2 comments

Comments

@logistiker
Copy link

$this->links['_self'] only exists at the top level to describe the current resource. It does not exist within embedded resources. There's a Link type check when _getEmbRes calls getXml which then calls setXMLAttributes and tries to call $this->getSelf() which will not return anything in this case. A null is not of the same type as Link.

@logistiker
Copy link
Author

oops, apparently I was wrong about self. It can be in embedded resources. I think though if it doesn't exist, then an exception should be thrown and not a fatal error.

@hjr3
Copy link
Collaborator

hjr3 commented Oct 28, 2014

This is def a bug. I am not sure it is even possible not to provide a self link given the API though.

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

2 participants