diff options
author | Andrey Andreev <narf@devilix.net> | 2014-06-04 20:28:13 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-06-04 20:28:13 +0200 |
commit | ef41786a8a3e04d30fef757acd83c5ab888df88e (patch) | |
tree | b5cfa09360389e610470946d4437e0cd324fe118 | |
parent | 5995e08ed0d5cf89747911443be06a26e410154f (diff) |
#3073: Fix temp/flash data getters
-rw-r--r-- | system/libraries/Session/Session.php | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index bdcde1e76..df6225e68 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -509,7 +509,7 @@ class CI_Session { $userdata = array(); $_exclude = array_merge( - array('__ci_f', '__ci_t'), + array('__ci_vars'), $this->get_flash_keys(), $this->get_temp_keys() ); @@ -619,18 +619,18 @@ class CI_Session { { if (isset($key)) { - return isset($_SESSION['__ci_f'], $_SESSION['__ci_f'][$key], $_SESSION[$key]) + return (isset($_SESSION['__ci_vars'], $_SESSION['__ci_vars'][$key], $_SESSION[$key]) && ! is_int($_SESSION['__ci_vars'][$key])) ? $_SESSION[$key] : NULL; } $flashdata = array(); - if ( ! empty($_SESSION['__ci_f'])) + if ( ! empty($_SESSION['__ci_vars'])) { - foreach (array_keys($_SESSION['__ci_f']) as $key) + foreach ($_SESSION['__ci_vars'] as $key => &$value) { - $flashdata[$key] = $_SESSION[$key]; + is_int($value) OR $flashdata[$key] = $_SESSION[$key]; } } @@ -683,18 +683,18 @@ class CI_Session { { if (isset($key)) { - return isset($_SESSION['__ci_t'], $_SESSION['__ci_t'][$key], $_SESSION[$key]) + return (isset($_SESSION['__ci_vars'], $_SESSION['__ci_vars'][$key], $_SESSION[$key]) && is_int($_SESSION['__ci_vars'][$key])) ? $_SESSION[$key] : NULL; } $tempdata = array(); - if ( ! empty($_SESSION['__ci_t'])) + if ( ! empty($_SESSION['__ci_vars'])) { - foreach (array_keys($_SESSION['__ci_t']) as $key) + foreach ($_SESSION['__ci_vars'] as $key => &$value) { - $tempdata[$key] = $_SESSION[$key]; + is_int($value) && $tempdata[$key] = $_SESSION[$key]; } } |