From fd3105716f5cdede79b9b471561413c161db250c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Mon, 30 Mar 2015 17:19:26 +0300 Subject: Fix #3717 --- system/libraries/Session/Session.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index bb457c659..0549fef66 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -869,7 +869,7 @@ class CI_Session { public function set_tempdata($data, $value = NULL, $ttl = 300) { $this->set_userdata($data, $value); - $this->mark_as_temp($data, $ttl); + $this->mark_as_temp(is_array($data) ? array_keys($data) : $data, $ttl); } // ------------------------------------------------------------------------ -- cgit v1.2.3-24-g4f1b From da7a2205876791dda5b9b62840c3cf6bd6233543 Mon Sep 17 00:00:00 2001 From: Achraf Almouloudi Date: Wed, 1 Apr 2015 05:27:56 +0100 Subject: Fixed typo --- system/libraries/Encryption.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/Encryption.php b/system/libraries/Encryption.php index e3e68139a..f3e039881 100644 --- a/system/libraries/Encryption.php +++ b/system/libraries/Encryption.php @@ -121,7 +121,7 @@ class CI_Encryption { ); /** - * List of supported HMAC algorightms + * List of supported HMAC algorithms * * name => digest size pairs * -- cgit v1.2.3-24-g4f1b From b7a8fbb9588ce4603e9c8fa16072a186e70b8bdb Mon Sep 17 00:00:00 2001 From: Kyle Gadd Date: Fri, 3 Apr 2015 17:37:44 -0600 Subject: Matched root_path's slashes with the name being replaced --- system/libraries/Zip.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index f2f17148b..3e98ac568 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -352,7 +352,7 @@ class CI_Zip { // Set the original directory root for child dir's to use as relative if ($root_path === NULL) { - $root_path = dirname($path).DIRECTORY_SEPARATOR; + $root_path = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, dirname($path)).DIRECTORY_SEPARATOR; } while (FALSE !== ($file = readdir($fp))) -- cgit v1.2.3-24-g4f1b From 475dfac090505832719cb6ff4ff13ab7ac655fbb Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Tue, 7 Apr 2015 00:07:04 +0300 Subject: Disallow empty FV rules ... for consistency Related: #3736 --- system/libraries/Form_validation.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'system/libraries') diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php index 05de59628..522eba704 100644 --- a/system/libraries/Form_validation.php +++ b/system/libraries/Form_validation.php @@ -198,22 +198,20 @@ class CI_Form_validation { return $this; } - // No fields? Nothing to do... - if ( ! is_string($field) OR $field === '') + // No fields or no rules? Nothing to do... + if ( ! is_string($field) OR $field === '' OR empty($rules)) { return $this; } elseif ( ! is_array($rules)) { // BC: Convert pipe-separated rules string to an array - if (is_string($rules)) - { - $rules = explode('|', $rules); - } - else + if ( ! is_string($rules)) { return $this; } + + $rules = explode('|', $rules); } // If the field label wasn't passed we use the field name -- cgit v1.2.3-24-g4f1b From abd713f3a6d09f83304e3cf97ff1dfc7b237e094 Mon Sep 17 00:00:00 2001 From: ftwbzhao Date: Thu, 9 Apr 2015 13:11:51 +0800 Subject: use = instead of += --- system/libraries/Cache/drivers/Cache_redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index a35fbf6d2..43e217784 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -270,7 +270,7 @@ class CI_Cache_redis extends CI_Driver if ($CI->config->load('redis', TRUE, TRUE)) { - $config += $CI->config->item('redis'); + $config = $CI->config->item('redis'); } $config = array_merge(self::$_default_config, $config); -- cgit v1.2.3-24-g4f1b From b2119a785cc980cc0b22bc8535729dbad50a0913 Mon Sep 17 00:00:00 2001 From: ftwbzhao Date: Thu, 9 Apr 2015 13:27:01 +0800 Subject: [fix] redis get_metadata --- system/libraries/Cache/drivers/Cache_redis.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'system/libraries') diff --git a/system/libraries/Cache/drivers/Cache_redis.php b/system/libraries/Cache/drivers/Cache_redis.php index 43e217784..114c32983 100644 --- a/system/libraries/Cache/drivers/Cache_redis.php +++ b/system/libraries/Cache/drivers/Cache_redis.php @@ -223,7 +223,7 @@ class CI_Cache_redis extends CI_Driver { $value = $this->get($key); - if ($value) + if ($value !== FALSE) { return array( 'expire' => time() + $this->_redis->ttl($key), -- cgit v1.2.3-24-g4f1b