From da9b6453cee2f025aecb9ab30c9d3029fbf527db Mon Sep 17 00:00:00 2001 From: "Larry E. Masters" Date: Mon, 14 Dec 2015 10:56:55 -0600 Subject: [PATCH] session_status() not available until 5.4 Adding check for php version --- lib/Cake/Model/Datasource/CakeSession.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/Cake/Model/Datasource/CakeSession.php b/lib/Cake/Model/Datasource/CakeSession.php index 2afbcc0c3b6..3ef11505686 100644 --- a/lib/Cake/Model/Datasource/CakeSession.php +++ b/lib/Cake/Model/Datasource/CakeSession.php @@ -218,7 +218,10 @@ public static function start() { * @return bool True if session has been started. */ public static function started() { - return (session_status() === PHP_SESSION_ACTIVE); + if(PHP_VERSION >=5.4) { + return (session_status() === PHP_SESSION_ACTIVE); + } + return isset($_SESSION) && session_id(); } /**