{"action":"opened","issue":{"url":"https://api.github.com/repos/modmore/Gitify/issues/142","labels_url":"https://api.github.com/repos/modmore/Gitify/issues/142/labels{/name}","comments_url":"https://api.github.com/repos/modmore/Gitify/issues/142/comments","events_url":"https://api.github.com/repos/modmore/Gitify/issues/142/events","html_url":"https://github.com/modmore/Gitify/issues/142","id":115658833,"number":142,"title":"Undefined offset warning in BuildCommand","user":{"login":"inreti","id":2852461,"avatar_url":"https://avatars.githubusercontent.com/u/2852461?v=3","gravatar_id":"","url":"https://api.github.com/users/inreti","html_url":"https://github.com/inreti","followers_url":"https://api.github.com/users/inreti/followers","following_url":"https://api.github.com/users/inreti/following{/other_user}","gists_url":"https://api.github.com/users/inreti/gists{/gist_id}","starred_url":"https://api.github.com/users/inreti/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/inreti/subscriptions","organizations_url":"https://api.github.com/users/inreti/orgs","repos_url":"https://api.github.com/users/inreti/repos","events_url":"https://api.github.com/users/inreti/events{/privacy}","received_events_url":"https://api.github.com/users/inreti/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-11-07T10:55:59Z","updated_at":"2015-11-07T10:55:59Z","closed_at":null,"body":"I constantly get tons of the following warning from gitify:\r\n\r\n```php\r\n(WARN @ /home/vagrant/Gitify/src/Command/BuildCommand.php : 407) PHP notice: Undefined offset: 1`\r\n```\r\n\r\nThis is because of the too optimistic list assign in line 407: \r\n\r\n```php\r\nlist($rawData, $content) = explode(Gitify::$contentSeparator, $file);`\r\n```\r\nIt seems that I have a lot of data files where no content is stored inside. But the list assign assumes always 2 parts as the result of the explode...\r\nIt might be better here to use an array instead, like this for example:\r\n\r\n```php\r\n$filedata = explode(Gitify::$contentSeparator, $file);\r\n$rawData = $filedata[0];\r\n$data = (isset($filedata[1]))? $filedata[1] : \"\";\r\n```"}}