{"action":"created","issue":{"url":"https://api.github.com/repos/xenocrat/chyrp-lite/issues/26","repository_url":"https://api.github.com/repos/xenocrat/chyrp-lite","labels_url":"https://api.github.com/repos/xenocrat/chyrp-lite/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/xenocrat/chyrp-lite/issues/26/comments","events_url":"https://api.github.com/repos/xenocrat/chyrp-lite/issues/26/events","html_url":"https://github.com/xenocrat/chyrp-lite/pull/26","id":140314521,"number":26,"title":"Fix error on groups created/updated with no permissions","user":{"login":"kehugter","id":6382342,"avatar_url":"https://avatars.githubusercontent.com/u/6382342?v=3","gravatar_id":"","url":"https://api.github.com/users/kehugter","html_url":"https://github.com/kehugter","followers_url":"https://api.github.com/users/kehugter/followers","following_url":"https://api.github.com/users/kehugter/following{/other_user}","gists_url":"https://api.github.com/users/kehugter/gists{/gist_id}","starred_url":"https://api.github.com/users/kehugter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kehugter/subscriptions","organizations_url":"https://api.github.com/users/kehugter/orgs","repos_url":"https://api.github.com/users/kehugter/repos","events_url":"https://api.github.com/users/kehugter/events{/privacy}","received_events_url":"https://api.github.com/users/kehugter/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-11T23:05:57Z","updated_at":"2016-03-12T09:50:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/xenocrat/chyrp-lite/pulls/26","html_url":"https://github.com/xenocrat/chyrp-lite/pull/26","diff_url":"https://github.com/xenocrat/chyrp-lite/pull/26.diff","patch_url":"https://github.com/xenocrat/chyrp-lite/pull/26.patch"},"body":"An array was expected, but setting no permissions was providing null instead.\r\nAn empty array is set as fallback."},"comment":{"url":"https://api.github.com/repos/xenocrat/chyrp-lite/issues/comments/195705352","html_url":"https://github.com/xenocrat/chyrp-lite/pull/26#issuecomment-195705352","issue_url":"https://api.github.com/repos/xenocrat/chyrp-lite/issues/26","id":195705352,"user":{"login":"xenocrat","id":4855211,"avatar_url":"https://avatars.githubusercontent.com/u/4855211?v=3","gravatar_id":"","url":"https://api.github.com/users/xenocrat","html_url":"https://github.com/xenocrat","followers_url":"https://api.github.com/users/xenocrat/followers","following_url":"https://api.github.com/users/xenocrat/following{/other_user}","gists_url":"https://api.github.com/users/xenocrat/gists{/gist_id}","starred_url":"https://api.github.com/users/xenocrat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xenocrat/subscriptions","organizations_url":"https://api.github.com/users/xenocrat/orgs","repos_url":"https://api.github.com/users/xenocrat/repos","events_url":"https://api.github.com/users/xenocrat/events{/privacy}","received_events_url":"https://api.github.com/users/xenocrat/received_events","type":"User","site_admin":false},"created_at":"2016-03-12T09:50:54Z","updated_at":"2016-03-12T09:50:54Z","body":"Good catch! Please could you change a couple of things before I accept?\r\n\r\n1. Please test and set `$_POST['permissions']` using `fallback($_POST['permissions'], array());` instead of the conditional you have now – no assignment or conditional needed. The `fallback()` helper tests a value and sets it if necessary. If I'm not mistaken, your conditional will fail PHP strict validation – make sure you have `DEBUG` set to `true` in common.php for development work.\r\n2. Please remove the `if (is_array($permissions))` conditional from Group.php. I actually prefer that it hard fails in case junk data is sent to it, rather than fail silently in a way that will make fault finding difficult."}}