Skip to content

Commit

Permalink
session_status() not available until 5.4
Browse files Browse the repository at this point in the history
Adding check for php version
  • Loading branch information
phpnut committed Dec 14, 2015
1 parent 6e09e64 commit da9b645
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/Cake/Model/Datasource/CakeSession.php
Expand Up @@ -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();
}

/**
Expand Down

0 comments on commit da9b645

Please sign in to comment.