{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/5666","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/5666/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/5666/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/5666/events","html_url":"https://github.com/cakephp/cakephp/issues/5666","id":54394512,"number":5666,"title":"CakeSession::destroy() should check for existence of session","user":{"login":"davidsteinsland","id":125661,"avatar_url":"https://avatars.githubusercontent.com/u/125661?v=3","gravatar_id":"","url":"https://api.github.com/users/davidsteinsland","html_url":"https://github.com/davidsteinsland","followers_url":"https://api.github.com/users/davidsteinsland/followers","following_url":"https://api.github.com/users/davidsteinsland/following{/other_user}","gists_url":"https://api.github.com/users/davidsteinsland/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsteinsland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsteinsland/subscriptions","organizations_url":"https://api.github.com/users/davidsteinsland/orgs","repos_url":"https://api.github.com/users/davidsteinsland/repos","events_url":"https://api.github.com/users/davidsteinsland/events{/privacy}","received_events_url":"https://api.github.com/users/davidsteinsland/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Defect","name":"Defect","color":"f7c6c7"}],"state":"closed","locked":false,"assignee":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/7","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/7/labels","id":453043,"number":7,"title":"3.0.0","description":"New major release that breaks compatibility with 2.x\r\n\r\n- PHP5.4.19+\r\n- New ORM & behaviors.\r\n- Improved Routing\r\n- PSR-0 and composer support.\r\n- Simpler configuration and bootstrapping.\r\n- Improved configuration handling.\r\n- Improved bake.\r\n\r\nSee [the roadmap](http://github.com/cakephp/cakephp/wiki/3.0-roadmap) for more details.","creator":{"login":"lh-import","id":5175817,"avatar_url":"https://avatars.githubusercontent.com/u/5175817?v=3","gravatar_id":"","url":"https://api.github.com/users/lh-import","html_url":"https://github.com/lh-import","followers_url":"https://api.github.com/users/lh-import/followers","following_url":"https://api.github.com/users/lh-import/following{/other_user}","gists_url":"https://api.github.com/users/lh-import/gists{/gist_id}","starred_url":"https://api.github.com/users/lh-import/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lh-import/subscriptions","organizations_url":"https://api.github.com/users/lh-import/orgs","repos_url":"https://api.github.com/users/lh-import/repos","events_url":"https://api.github.com/users/lh-import/events{/privacy}","received_events_url":"https://api.github.com/users/lh-import/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":2147,"state":"open","created_at":"2013-10-11T20:56:23Z","updated_at":"2015-01-15T10:18:53Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2015-01-14T23:52:19Z","updated_at":"2015-01-15T10:18:53Z","closed_at":"2015-01-15T10:18:53Z","body":"This is to prevent warnings saying:\r\n\r\n```\r\nPHP Warning: session_destroy(): Trying to destroy uninitialized session\r\n```\r\n\r\nOne could handle it as:\r\n```php\r\nif (session_status() === PHP_SESSION_ACTIVE) {\r\n    session_destroy();\r\n} else {\r\n    // one might also log to CakeLog or something here.\r\n}\r\n\r\n$_SESSION = null;\r\n// etc.\r\n```\r\n\r\n`CakeSession::destroy()` tries to start a session if it isn't started, but it does not check if a session was actually started."},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/70065423","html_url":"https://github.com/cakephp/cakephp/issues/5666#issuecomment-70065423","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/5666","id":70065423,"user":{"login":"dereuromark","id":39854,"avatar_url":"https://avatars.githubusercontent.com/u/39854?v=3","gravatar_id":"","url":"https://api.github.com/users/dereuromark","html_url":"https://github.com/dereuromark","followers_url":"https://api.github.com/users/dereuromark/followers","following_url":"https://api.github.com/users/dereuromark/following{/other_user}","gists_url":"https://api.github.com/users/dereuromark/gists{/gist_id}","starred_url":"https://api.github.com/users/dereuromark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereuromark/subscriptions","organizations_url":"https://api.github.com/users/dereuromark/orgs","repos_url":"https://api.github.com/users/dereuromark/repos","events_url":"https://api.github.com/users/dereuromark/events{/privacy}","received_events_url":"https://api.github.com/users/dereuromark/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T10:18:53Z","updated_at":"2015-01-15T10:18:53Z","body":"Closing as PR for 2.x is now open as well: https://github.com/cakephp/cakephp/pull/5670"}}