Skip to content
Permalink
Browse files

session_status() not available until 5.4

Adding check for php version
  • Loading branch information...
phpnut committed Dec 14, 2015
1 parent 6e09e64 commit da9b6453cee2f025aecb9ab30c9d3029fbf527db
Showing with 4 additions and 1 deletion.
  1. +4 −1 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();
}
/**

0 comments on commit da9b645

Please sign in to comment.
You can’t perform that action at this time.