Permalink
Browse files

Make sure sessions are started before destroying them.

Fixes #3551
  • Loading branch information...
markstory committed Jan 22, 2013
1 parent 622d2f0 commit efadf3dcd32d235981aa798ae826b8b7b38aa9b4
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/Cake/Model/Datasource/CakeSession.php
@@ -421,9 +421,10 @@ public static function write($name, $value = null) {
* @return void
*/
public static function destroy() {
if (self::started()) {
session_destroy();
if (!self::started()) {
self::start();
}
session_destroy();
self::clear();
}

0 comments on commit efadf3d

Please sign in to comment.