summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/Session.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2016-03-21 17:32:19 +0100
committerAndrey Andreev <narf@devilix.net>2016-03-21 17:32:19 +0100
commitb4d719dc7fb3b010b53c09e7e82f979abf731ff9 (patch)
tree34e3d8213830f8d6362fbb868718806ad100dceb /system/libraries/Session/Session.php
parent99e8dc396f6f79980623daaf9265f4933b897ff6 (diff)
parenteb373a1abb348515001123ecbaca5e5384e69d19 (diff)
Merge branch '3.0-stable' into develop
Resolved conflicts: user_guide_src/source/changelog.rst user_guide_src/source/conf.py user_guide_src/source/installation/downloads.rst user_guide_src/source/installation/upgrading.rst
Diffstat (limited to 'system/libraries/Session/Session.php')
-rw-r--r--system/libraries/Session/Session.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index 77c56ae70..c9d2e8adc 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -584,6 +584,24 @@ class CI_Session {
// ------------------------------------------------------------------------
/**
+ * __isset()
+ *
+ * @param string $key 'session_id' or a session data key
+ * @return bool
+ */
+ public function __isset($key)
+ {
+ if ($key === 'session_id')
+ {
+ return (session_status() === PHP_SESSION_ACTIVE);
+ }
+
+ return isset($_SESSION[$key]);
+ }
+
+ // ------------------------------------------------------------------------
+
+ /**
* __set()
*
* @param string $key Session data key