{"action":"created","issue":{"url":"https://api.github.com/repos/Jmeyering/hal-explorer/issues/10","repository_url":"https://api.github.com/repos/Jmeyering/hal-explorer","labels_url":"https://api.github.com/repos/Jmeyering/hal-explorer/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/Jmeyering/hal-explorer/issues/10/comments","events_url":"https://api.github.com/repos/Jmeyering/hal-explorer/issues/10/events","html_url":"https://github.com/Jmeyering/hal-explorer/issues/10","id":184264042,"number":10,"title":"HyperMediaParser()->getLink() can return an array of objects, not just a single object","user":{"login":"richardtape","id":116946,"avatar_url":"https://avatars.githubusercontent.com/u/116946?v=3","gravatar_id":"","url":"https://api.github.com/users/richardtape","html_url":"https://github.com/richardtape","followers_url":"https://api.github.com/users/richardtape/followers","following_url":"https://api.github.com/users/richardtape/following{/other_user}","gists_url":"https://api.github.com/users/richardtape/gists{/gist_id}","starred_url":"https://api.github.com/users/richardtape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardtape/subscriptions","organizations_url":"https://api.github.com/users/richardtape/orgs","repos_url":"https://api.github.com/users/richardtape/repos","events_url":"https://api.github.com/users/richardtape/events{/privacy}","received_events_url":"https://api.github.com/users/richardtape/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"Jmeyering","id":5166603,"avatar_url":"https://avatars.githubusercontent.com/u/5166603?v=3","gravatar_id":"","url":"https://api.github.com/users/Jmeyering","html_url":"https://github.com/Jmeyering","followers_url":"https://api.github.com/users/Jmeyering/followers","following_url":"https://api.github.com/users/Jmeyering/following{/other_user}","gists_url":"https://api.github.com/users/Jmeyering/gists{/gist_id}","starred_url":"https://api.github.com/users/Jmeyering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jmeyering/subscriptions","organizations_url":"https://api.github.com/users/Jmeyering/orgs","repos_url":"https://api.github.com/users/Jmeyering/repos","events_url":"https://api.github.com/users/Jmeyering/events{/privacy}","received_events_url":"https://api.github.com/users/Jmeyering/received_events","type":"User","site_admin":false},"assignees":[{"login":"Jmeyering","id":5166603,"avatar_url":"https://avatars.githubusercontent.com/u/5166603?v=3","gravatar_id":"","url":"https://api.github.com/users/Jmeyering","html_url":"https://github.com/Jmeyering","followers_url":"https://api.github.com/users/Jmeyering/followers","following_url":"https://api.github.com/users/Jmeyering/following{/other_user}","gists_url":"https://api.github.com/users/Jmeyering/gists{/gist_id}","starred_url":"https://api.github.com/users/Jmeyering/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Jmeyering/subscriptions","organizations_url":"https://api.github.com/users/Jmeyering/orgs","repos_url":"https://api.github.com/users/Jmeyering/repos","events_url":"https://api.github.com/users/Jmeyering/events{/privacy}","received_events_url":"https://api.github.com/users/Jmeyering/received_events","type":"User","site_admin":false}],"milestone":null,"comments":3,"created_at":"2016-10-20T15:35:23Z","updated_at":"2016-10-21T01:39:33Z","closed_at":null,"body":"First, thank you so much for putting this together.\r\n\r\nIn `\\HalExplorer\\Explorer::followLink()` the `HyperMediaParser()->getLink()` method can return an array of objects. So the `property_exists()` check on [line 242 ](https://github.com/Jmeyering/hal-explorer/blob/master/src/Explorer.php#L242) can throw a few warnings such as `Warning: First parameter must either be an object or the name of an existing class in ...`.\r\n\r\nFor my needs, I needed to grab `$link[0]` before the `property_exists()` call.\r\n\r\nNow, I don't know if this is an issue with the API I'm using (It's a new, internal API at my university), or whether this is something that your library should account for. I'm new to HAL APIs.\r\n\r\nIf this is something that the HAL-explorer library should deal with, I'm happy to create a PR here, but would love some advice on how you think this should be handled.\r\n"},"comment":{"url":"https://api.github.com/repos/Jmeyering/hal-explorer/issues/comments/255272630","html_url":"https://github.com/Jmeyering/hal-explorer/issues/10#issuecomment-255272630","issue_url":"https://api.github.com/repos/Jmeyering/hal-explorer/issues/10","id":255272630,"user":{"login":"richardtape","id":116946,"avatar_url":"https://avatars.githubusercontent.com/u/116946?v=3","gravatar_id":"","url":"https://api.github.com/users/richardtape","html_url":"https://github.com/richardtape","followers_url":"https://api.github.com/users/richardtape/followers","following_url":"https://api.github.com/users/richardtape/following{/other_user}","gists_url":"https://api.github.com/users/richardtape/gists{/gist_id}","starred_url":"https://api.github.com/users/richardtape/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardtape/subscriptions","organizations_url":"https://api.github.com/users/richardtape/orgs","repos_url":"https://api.github.com/users/richardtape/repos","events_url":"https://api.github.com/users/richardtape/events{/privacy}","received_events_url":"https://api.github.com/users/richardtape/received_events","type":"User","site_admin":false},"created_at":"2016-10-21T01:39:33Z","updated_at":"2016-10-21T01:39:33Z","body":"Oh, also that's with\r\n\r\n```\r\nif ( is_array( $link ) ) {\r\n    $link = $link[0];\r\n}\r\n```\r\n\r\nin `\\HalExplorer\\Explorer::followLink()`"}}
{"actor":{"display_login":"richardtape"}}