mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
session_status() not available until 5.4
Adding check for php version
This commit is contained in:
parent
6e09e64432
commit
da9b6453ce
1 changed files with 4 additions and 1 deletions
|
@ -218,7 +218,10 @@ class CakeSession {
|
|||
* @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();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue