{"action":"created","issue":{"url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/30","repository_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser","labels_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/30/labels{/name}","comments_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/30/comments","events_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/30/events","html_url":"https://github.com/malle-pietje/UniFi-API-browser/pull/30","id":236505098,"number":30,"title":"fix empty site detection, not populating menu","user":{"login":"OceansCrashing","id":3989824,"avatar_url":"https://avatars0.githubusercontent.com/u/3989824?v=3","gravatar_id":"","url":"https://api.github.com/users/OceansCrashing","html_url":"https://github.com/OceansCrashing","followers_url":"https://api.github.com/users/OceansCrashing/followers","following_url":"https://api.github.com/users/OceansCrashing/following{/other_user}","gists_url":"https://api.github.com/users/OceansCrashing/gists{/gist_id}","starred_url":"https://api.github.com/users/OceansCrashing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OceansCrashing/subscriptions","organizations_url":"https://api.github.com/users/OceansCrashing/orgs","repos_url":"https://api.github.com/users/OceansCrashing/repos","events_url":"https://api.github.com/users/OceansCrashing/events{/privacy}","received_events_url":"https://api.github.com/users/OceansCrashing/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-16T14:48:26Z","updated_at":"2017-06-20T12:29:28Z","closed_at":"2017-06-16T15:45:13Z","pull_request":{"url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/pulls/30","html_url":"https://github.com/malle-pietje/UniFi-API-browser/pull/30","diff_url":"https://github.com/malle-pietje/UniFi-API-browser/pull/30.diff","patch_url":"https://github.com/malle-pietje/UniFi-API-browser/pull/30.patch"},"body":"I'm wondering if all the === '' should be changed to a more reliable empty detection.  I used \"empty()\" for this instance.\r\n\r\nthe === '' was failing and skipping the section where the sites were pulled.\r\n\r\nAnother thing I noticed was that if the controller url doesn't include the protocol (https://), version detection fails.  Maybe this should be prepended automatically if it's missed?  If I remember correctly, the example in the config template seems to suggest that just the ip and port is fine.  Let me know if I should create an issue or separate pull request for that.\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/comments/309737945","html_url":"https://github.com/malle-pietje/UniFi-API-browser/pull/30#issuecomment-309737945","issue_url":"https://api.github.com/repos/malle-pietje/UniFi-API-browser/issues/30","id":309737945,"user":{"login":"OceansCrashing","id":3989824,"avatar_url":"https://avatars0.githubusercontent.com/u/3989824?v=3","gravatar_id":"","url":"https://api.github.com/users/OceansCrashing","html_url":"https://github.com/OceansCrashing","followers_url":"https://api.github.com/users/OceansCrashing/followers","following_url":"https://api.github.com/users/OceansCrashing/following{/other_user}","gists_url":"https://api.github.com/users/OceansCrashing/gists{/gist_id}","starred_url":"https://api.github.com/users/OceansCrashing/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OceansCrashing/subscriptions","organizations_url":"https://api.github.com/users/OceansCrashing/orgs","repos_url":"https://api.github.com/users/OceansCrashing/repos","events_url":"https://api.github.com/users/OceansCrashing/events{/privacy}","received_events_url":"https://api.github.com/users/OceansCrashing/received_events","type":"User","site_admin":false},"created_at":"2017-06-20T12:29:27Z","updated_at":"2017-06-20T12:29:27Z","body":"Great, thanks! Make sure you look closely at both isset() and empty();\nisset will only return false if the variable is NULL or hasn't been set at\nall. It won't match FALSE or an empty string. I use either one, depending\non the use case.  empty might be a small bit slower, but it seems to be a\nbetter fit in this instance. What do you think? Hope that helps.\n\nOn Jun 16, 2017, at 11:45 AM, malle-pietje <notifications@github.com> wrote:\n\nYeah, makes sense! That's one of those things that sneaks in in the early\nstages of the development cycle and never get's noticed... until someone\nlike you comes by😉\n\nBTW, I was reading up on some stuff this afternoon and saw some benchmarks\nthat isset() is fractionally faster than empty():\nhttp://www.phpbench.com/\nInteresting read.\n\nI'll merge this PR, and if you have a suggestion for the url \"validation\"\nplease submit a new PR and I'll merge that in as well.\n\nThanks!\n\n—\nYou are receiving this because you authored the thread.\nReply to this email directly, view it on GitHub\n<https://github.com/malle-pietje/UniFi-API-browser/pull/30#issuecomment-309061341>,\nor mute the thread\n<https://github.com/notifications/unsubscribe-auth/ADzhQKhkHpz2FuNFOvcBhRP91Pj9d6c4ks5sEqMNgaJpZM4N8jYs>\n.\n"}}
{"actor":{"display_login":"OceansCrashing"}}