{"action":"closed","issue":{"url":"https://api.github.com/repos/Jensen-Technologies/neno/issues/127","labels_url":"https://api.github.com/repos/Jensen-Technologies/neno/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/Jensen-Technologies/neno/issues/127/comments","events_url":"https://api.github.com/repos/Jensen-Technologies/neno/issues/127/events","html_url":"https://github.com/Jensen-Technologies/neno/issues/127","id":105053734,"number":127,"title":"PHP Warnings on foreach()","user":{"login":"acs-ferreira","id":12234510,"avatar_url":"https://avatars.githubusercontent.com/u/12234510?v=3","gravatar_id":"","url":"https://api.github.com/users/acs-ferreira","html_url":"https://github.com/acs-ferreira","followers_url":"https://api.github.com/users/acs-ferreira/followers","following_url":"https://api.github.com/users/acs-ferreira/following{/other_user}","gists_url":"https://api.github.com/users/acs-ferreira/gists{/gist_id}","starred_url":"https://api.github.com/users/acs-ferreira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acs-ferreira/subscriptions","organizations_url":"https://api.github.com/users/acs-ferreira/orgs","repos_url":"https://api.github.com/users/acs-ferreira/repos","events_url":"https://api.github.com/users/acs-ferreira/events{/privacy}","received_events_url":"https://api.github.com/users/acs-ferreira/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Jensen-Technologies/neno/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"vistiyos","id":822629,"avatar_url":"https://avatars.githubusercontent.com/u/822629?v=3","gravatar_id":"","url":"https://api.github.com/users/vistiyos","html_url":"https://github.com/vistiyos","followers_url":"https://api.github.com/users/vistiyos/followers","following_url":"https://api.github.com/users/vistiyos/following{/other_user}","gists_url":"https://api.github.com/users/vistiyos/gists{/gist_id}","starred_url":"https://api.github.com/users/vistiyos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vistiyos/subscriptions","organizations_url":"https://api.github.com/users/vistiyos/orgs","repos_url":"https://api.github.com/users/vistiyos/repos","events_url":"https://api.github.com/users/vistiyos/events{/privacy}","received_events_url":"https://api.github.com/users/vistiyos/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/Jensen-Technologies/neno/milestones/3","html_url":"https://github.com/Jensen-Technologies/neno/milestones/Neno%20version%201.2.0","labels_url":"https://api.github.com/repos/Jensen-Technologies/neno/milestones/3/labels","id":1182169,"number":3,"title":"Neno version 1.2.0","description":"WYSIWYG and JSON edtors","creator":{"login":"vistiyos","id":822629,"avatar_url":"https://avatars.githubusercontent.com/u/822629?v=3","gravatar_id":"","url":"https://api.github.com/users/vistiyos","html_url":"https://github.com/vistiyos","followers_url":"https://api.github.com/users/vistiyos/followers","following_url":"https://api.github.com/users/vistiyos/following{/other_user}","gists_url":"https://api.github.com/users/vistiyos/gists{/gist_id}","starred_url":"https://api.github.com/users/vistiyos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vistiyos/subscriptions","organizations_url":"https://api.github.com/users/vistiyos/orgs","repos_url":"https://api.github.com/users/vistiyos/repos","events_url":"https://api.github.com/users/vistiyos/events{/privacy}","received_events_url":"https://api.github.com/users/vistiyos/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":1,"state":"open","created_at":"2015-06-26T07:33:14Z","updated_at":"2015-09-07T12:32:18Z","due_on":"2015-09-29T22:00:00Z","closed_at":null},"comments":1,"created_at":"2015-09-05T22:31:06Z","updated_at":"2015-09-07T12:32:18Z","closed_at":"2015-09-07T12:32:18Z","body":"My PHP log quicly fills up with messages like\r\n\r\n````Invalid argument supplied for foreach() in libraries/neno/content/element/group.php on line 476````\r\n\r\nWhat about not allocating an empty array when you've got nothing to begin with anyway ?\r\n\r\n````\r\nforeach ((array) $this->tables as $table) {\r\n}\r\n````\r\n\r\ninstead of\r\n\r\n````\r\nforeach ($this->tables as $table) {\r\n}\r\n````\r\n\r\nIf we cast any value to an array, we will get an array whatever value it was, avoiding these warnings."}}