{"action":"created","issue":{"url":"https://api.github.com/repos/infinity-next/infinity-next/issues/110","labels_url":"https://api.github.com/repos/infinity-next/infinity-next/issues/110/labels{/name}","comments_url":"https://api.github.com/repos/infinity-next/infinity-next/issues/110/comments","events_url":"https://api.github.com/repos/infinity-next/infinity-next/issues/110/events","html_url":"https://github.com/infinity-next/infinity-next/issues/110","id":105343915,"number":110,"title":"404 failure","user":{"login":"spanishtech","id":3960007,"avatar_url":"https://avatars.githubusercontent.com/u/3960007?v=3","gravatar_id":"","url":"https://api.github.com/users/spanishtech","html_url":"https://github.com/spanishtech","followers_url":"https://api.github.com/users/spanishtech/followers","following_url":"https://api.github.com/users/spanishtech/following{/other_user}","gists_url":"https://api.github.com/users/spanishtech/gists{/gist_id}","starred_url":"https://api.github.com/users/spanishtech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spanishtech/subscriptions","organizations_url":"https://api.github.com/users/spanishtech/orgs","repos_url":"https://api.github.com/users/spanishtech/repos","events_url":"https://api.github.com/users/spanishtech/events{/privacy}","received_events_url":"https://api.github.com/users/spanishtech/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-08T09:58:24Z","updated_at":"2015-09-08T10:04:14Z","closed_at":null,"body":"So I noticed when updated (Which I hadn't done in a while) there where numerous errors (first being a captcha but I assume that was me)\r\nThe one I assume is just a small thing that you can fix is that thread is not checked to be null before calling it's setRelation() method on line 459 of Board.php\r\n\r\n## Error here\r\n```php\r\n\t\t\t$thread = $this->posts()\r\n\t\t\t\t->where('board_id', $board_id)\r\n\t\t\t\t->withEverythingAndReplies()\r\n\t\t\t\t->orderBy('bumped_last', 'desc')\r\n\t\t\t\t->get()\r\n\t\t\t\t->first();\r\n\r\n\t\t\t$thread->setRelation('board', $this);\r\n\r\n```\r\n## Proposed fix\r\n```php\r\n\t\t\tif(!$thread)\r\n\t\t\t{\r\n\t\t\t\treturn $thread;\r\n\t\t\t}\r\n\t\t\t$thread->setRelation('board', $this);\r\n```\r\nThis does fix the issue but I'm unsure if it's up to scratch with standards"},"comment":{"url":"https://api.github.com/repos/infinity-next/infinity-next/issues/comments/138502673","html_url":"https://github.com/infinity-next/infinity-next/issues/110#issuecomment-138502673","issue_url":"https://api.github.com/repos/infinity-next/infinity-next/issues/110","id":138502673,"user":{"login":"jaw-sh","id":9262991,"avatar_url":"https://avatars.githubusercontent.com/u/9262991?v=3","gravatar_id":"","url":"https://api.github.com/users/jaw-sh","html_url":"https://github.com/jaw-sh","followers_url":"https://api.github.com/users/jaw-sh/followers","following_url":"https://api.github.com/users/jaw-sh/following{/other_user}","gists_url":"https://api.github.com/users/jaw-sh/gists{/gist_id}","starred_url":"https://api.github.com/users/jaw-sh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaw-sh/subscriptions","organizations_url":"https://api.github.com/users/jaw-sh/orgs","repos_url":"https://api.github.com/users/jaw-sh/repos","events_url":"https://api.github.com/users/jaw-sh/events{/privacy}","received_events_url":"https://api.github.com/users/jaw-sh/received_events","type":"User","site_admin":false},"created_at":"2015-09-08T10:04:14Z","updated_at":"2015-09-08T10:04:14Z","body":"The captcha issue is going to be because we moved to a remote Captcha repository. Run `composer update`.\r\n\r\nYour assessment was 100% correct. I just went with a more pedantic way of doing things.\r\n\r\n```\r\nif ($thread instanceof Post)\r\n```"}}