Hal icon indicating copy to clipboard operation
Hal copied to clipboard

_getEmbRes throws fatal error when it can't find self

Open logistiker opened this issue 12 years ago • 2 comments

$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 avatar Aug 29 '13 23:08 logistiker

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.

logistiker avatar Aug 29 '13 23:08 logistiker

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

hjr3 avatar Oct 28 '14 05:10 hjr3