{"action":"opened","issue":{"url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2386","labels_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2386/labels{/name}","comments_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2386/comments","events_url":"https://api.github.com/repos/symphonycms/symphony-2/issues/2386/events","html_url":"https://github.com/symphonycms/symphony-2/issues/2386","id":63467289,"number":2386,"title":"is_session_empty() - $_SESSION isn't always an array.","user":{"login":"pointybeard","id":24912,"avatar_url":"https://avatars.githubusercontent.com/u/24912?v=3","gravatar_id":"","url":"https://api.github.com/users/pointybeard","html_url":"https://github.com/pointybeard","followers_url":"https://api.github.com/users/pointybeard/followers","following_url":"https://api.github.com/users/pointybeard/following{/other_user}","gists_url":"https://api.github.com/users/pointybeard/gists{/gist_id}","starred_url":"https://api.github.com/users/pointybeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pointybeard/subscriptions","organizations_url":"https://api.github.com/users/pointybeard/orgs","repos_url":"https://api.github.com/users/pointybeard/repos","events_url":"https://api.github.com/users/pointybeard/events{/privacy}","received_events_url":"https://api.github.com/users/pointybeard/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/symphonycms/symphony-2/labels/1%20-%20Minor","name":"1 - Minor","color":"02e10c"},{"url":"https://api.github.com/repos/symphonycms/symphony-2/labels/Fix%20found","name":"Fix found","color":"009800"}],"state":"open","locked":false,"assignee":{"login":"pointybeard","id":24912,"avatar_url":"https://avatars.githubusercontent.com/u/24912?v=3","gravatar_id":"","url":"https://api.github.com/users/pointybeard","html_url":"https://github.com/pointybeard","followers_url":"https://api.github.com/users/pointybeard/followers","following_url":"https://api.github.com/users/pointybeard/following{/other_user}","gists_url":"https://api.github.com/users/pointybeard/gists{/gist_id}","starred_url":"https://api.github.com/users/pointybeard/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pointybeard/subscriptions","organizations_url":"https://api.github.com/users/pointybeard/orgs","repos_url":"https://api.github.com/users/pointybeard/repos","events_url":"https://api.github.com/users/pointybeard/events{/privacy}","received_events_url":"https://api.github.com/users/pointybeard/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/symphonycms/symphony-2/milestones/22","html_url":"https://github.com/symphonycms/symphony-2/milestones/2.6.1","labels_url":"https://api.github.com/repos/symphonycms/symphony-2/milestones/22/labels","id":1027023,"number":22,"title":"2.6.1","description":"","creator":{"login":"brendo","id":69268,"avatar_url":"https://avatars.githubusercontent.com/u/69268?v=3","gravatar_id":"","url":"https://api.github.com/users/brendo","html_url":"https://github.com/brendo","followers_url":"https://api.github.com/users/brendo/followers","following_url":"https://api.github.com/users/brendo/following{/other_user}","gists_url":"https://api.github.com/users/brendo/gists{/gist_id}","starred_url":"https://api.github.com/users/brendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendo/subscriptions","organizations_url":"https://api.github.com/users/brendo/orgs","repos_url":"https://api.github.com/users/brendo/repos","events_url":"https://api.github.com/users/brendo/events{/privacy}","received_events_url":"https://api.github.com/users/brendo/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":1,"state":"open","created_at":"2015-03-18T10:22:34Z","updated_at":"2015-03-21T23:40:49Z","due_on":"2015-03-30T22:00:00Z","closed_at":null},"comments":0,"created_at":"2015-03-21T23:40:49Z","updated_at":"2015-03-21T23:40:49Z","closed_at":null,"body":"I think this is pretty obscure, but on a couple of custom 2.6.x installs, I get the following error:\r\n\r\n`Symphony Warning: Invalid argument supplied for foreach()\r\nAn error occurred in /.../symphony/lib/boot/func.utilities.php around line 193`\r\n\r\nIssue #2107 introduced some new code: `is_session_empty()` which loops through `$_SESSION` to check if it's populated, however there is no sanity check. On my particular install, `$_SESSION` is sometimes `NULL`.\r\n\r\nI doubt this is a widespread problem, and likely relegated to some weird edge case, but I feel it's worth handling.\r\n\r\nSimple fix is to wrap the `foreach()` in an if statement to check that `$_SESSION` is an array. I'll issue a pull request for it shortly."}}