Skip to content

Commit

Permalink
Using function_exists instead of using constant
Browse files Browse the repository at this point in the history
  • Loading branch information
phpnut committed Dec 29, 2015
1 parent b1d9337 commit 6ee6210
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Cake/Model/Datasource/CakeSession.php
Expand Up @@ -217,7 +217,7 @@ public static function start() {
* @return bool True if session has been started.
*/
public static function started() {
if (PHP_VERSION >= 5.4) {
if (function_exists('session_status')) {
return isset($_SESSION) && (session_status() === PHP_SESSION_ACTIVE);
}
return isset($_SESSION) && session_id();
Expand Down

0 comments on commit 6ee6210

Please sign in to comment.