summaryrefslogtreecommitdiffstats
path: root/system/libraries/Session/Session.php
diff options
context:
space:
mode:
authorJohnathan Croom <johnathancroom@gmail.com>2012-11-24 21:03:13 +0100
committerJohnathan Croom <johnathancroom@gmail.com>2012-11-24 21:03:13 +0100
commit9d9849b2c459cb09ccebcdf89b2b3a15bc4fd722 (patch)
tree31e7263dfeb685a6099879492aad2373a77f697a /system/libraries/Session/Session.php
parent4beca5c9b64ba7bd1622e5c01666491f02cfa6db (diff)
Requested changed to keep_flashdata
Diffstat (limited to 'system/libraries/Session/Session.php')
-rw-r--r--system/libraries/Session/Session.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index 81d63c304..910b99936 100644
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -389,18 +389,18 @@ class CI_Session extends CI_Driver_Library {
/**
* Keeps existing flashdata available to next request.
*
- * @param mixed Item key
+ * @param mixed Item key(s)
* @return void
*/
public function keep_flashdata($data)
{
// Wrap item as array if singular
- if (is_string($data))
+ if (!is_array($data))
{
$data = array($data);
}
- foreach($data as $key)
+ foreach ($data as $key)
{
// 'old' flashdata gets removed. Here we mark all flashdata as 'new' to preserve it from _flashdata_sweep()
// Note the function will return NULL if the $key provided cannot be found
@@ -410,7 +410,6 @@ class CI_Session extends CI_Driver_Library {
$new_flashdata_key = self::FLASHDATA_KEY.self::FLASHDATA_NEW.$key;
$this->set_userdata($new_flashdata_key, $value);
}
-
}
// ------------------------------------------------------------------------