Hal
Hal copied to clipboard
_getEmbRes throws fatal error when it can't find self
$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.
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.
This is def a bug. I am not sure it is even possible not to provide a self link given the API though.