diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index bfb16e298..3d5a39762 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -442,7 +442,9 @@ class CakeSession { self::_startSession(); } - session_destroy(); + if (self::started()) { + session_destroy(); + } $_SESSION = null; self::$id = null;