summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Cache/drivers/Cache_memcached.php4
-rw-r--r--system/libraries/Email.php6
-rw-r--r--system/libraries/Form_validation.php15
-rw-r--r--system/libraries/Migration.php2
-rw-r--r--system/libraries/Session/drivers/Session_cookie.php5
-rw-r--r--system/libraries/Upload.php4
-rw-r--r--system/libraries/Xmlrpcs.php2
7 files changed, 13 insertions, 25 deletions
diff --git a/system/libraries/Cache/drivers/Cache_memcached.php b/system/libraries/Cache/drivers/Cache_memcached.php
index 8096b2650..246a7a264 100644
--- a/system/libraries/Cache/drivers/Cache_memcached.php
+++ b/system/libraries/Cache/drivers/Cache_memcached.php
@@ -182,11 +182,11 @@ class CI_Cache_memcached extends CI_Driver {
}
}
- if (class_exists('Memcached'))
+ if (class_exists('Memcached', FALSE))
{
$this->_memcached = new Memcached();
}
- elseif (class_exists('Memcache'))
+ elseif (class_exists('Memcache', FALSE))
{
$this->_memcached = new Memcache();
}
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 0319ac5e7..daa38484b 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -94,7 +94,7 @@ class CI_Email {
* @var int
*/
public $smtp_timeout = 5;
-
+
/**
* SMTP persistent connection
*
@@ -408,7 +408,7 @@ class CI_Email {
}
// --------------------------------------------------------------------
-
+
/**
* Destructor - Releases Resources
*
@@ -2021,7 +2021,7 @@ class CI_Email {
{
return TRUE;
}
-
+
if (strpos($reply, '334') !== 0)
{
$this->_set_error_message('lang:email_failed_smtp_login', $reply);
diff --git a/system/libraries/Form_validation.php b/system/libraries/Form_validation.php
index 1ed50844c..172e799f6 100644
--- a/system/libraries/Form_validation.php
+++ b/system/libraries/Form_validation.php
@@ -836,21 +836,6 @@ class CI_Form_validation {
// --------------------------------------------------------------------
/**
- * Checks if the rule is present within the validator
- *
- * Permits you to check if a rule is present within the validator
- *
- * @param string the field name
- * @return bool
- */
- public function has_rule($field)
- {
- return isset($this->_field_data[$field]);
- }
-
- // --------------------------------------------------------------------
-
- /**
* Get the value from a form
*
* Permits you to repopulate a form field with the value it was submitted
diff --git a/system/libraries/Migration.php b/system/libraries/Migration.php
index b673e9cb7..cc6fe48f0 100644
--- a/system/libraries/Migration.php
+++ b/system/libraries/Migration.php
@@ -228,7 +228,7 @@ class CI_Migration {
$class = 'Migration_'.ucfirst(strtolower($this->_get_migration_name(basename($file, '.php'))));
// Validate the migration file structure
- if ( ! class_exists($class))
+ if ( ! class_exists($class, FALSE))
{
$this->_error_string = sprintf($this->lang->line('migration_class_doesnt_exist'), $class);
return FALSE;
diff --git a/system/libraries/Session/drivers/Session_cookie.php b/system/libraries/Session/drivers/Session_cookie.php
index 11bb32fe0..0e8644102 100644
--- a/system/libraries/Session/drivers/Session_cookie.php
+++ b/system/libraries/Session/drivers/Session_cookie.php
@@ -494,7 +494,7 @@ class CI_Session_cookie extends CI_Session_driver {
$this->userdata = array(
'session_id' => $this->_make_sess_id(),
'ip_address' => $this->CI->input->ip_address(),
- 'user_agent' => substr($this->CI->input->user_agent(), 0, 120),
+ 'user_agent' => trim(substr($this->CI->input->user_agent(), 0, 120)),
'last_activity' => $this->now,
);
@@ -602,6 +602,9 @@ class CI_Session_cookie extends CI_Session_driver {
$set['user_data'] = $this->_serialize($userdata);
}
+ // Reset query builder values.
+ $this->CI->db->reset_query();
+
// Run the update query
// Any time we change the session id, it gets updated immediately,
// so our where clause below is always safe
diff --git a/system/libraries/Upload.php b/system/libraries/Upload.php
index acd76b03b..1c14f99ed 100644
--- a/system/libraries/Upload.php
+++ b/system/libraries/Upload.php
@@ -1212,7 +1212,7 @@ class CI_Upload {
* Notes:
* - the DIRECTORY_SEPARATOR comparison ensures that we're not on a Windows system
* - many system admins would disable the exec(), shell_exec(), popen() and similar functions
- * due to security concerns, hence the function_exists() checks
+ * due to security concerns, hence the function_usable() checks
*/
if (DIRECTORY_SEPARATOR !== '\\')
{
@@ -1223,7 +1223,7 @@ class CI_Upload {
if (function_usable('exec'))
{
/* This might look confusing, as $mime is being populated with all of the output when set in the second parameter.
- * However, we only neeed the last line, which is the actual return value of exec(), and as such - it overwrites
+ * However, we only need the last line, which is the actual return value of exec(), and as such - it overwrites
* anything that could already be set for $mime previously. This effectively makes the second parameter a dummy
* value, which is only put to allow us to get the return status code.
*/
diff --git a/system/libraries/Xmlrpcs.php b/system/libraries/Xmlrpcs.php
index d4524d230..d263d789d 100644
--- a/system/libraries/Xmlrpcs.php
+++ b/system/libraries/Xmlrpcs.php
@@ -31,7 +31,7 @@ if ( ! function_exists('xml_parser_create'))
show_error('Your PHP installation does not support XML');
}
-if ( ! class_exists('CI_Xmlrpc'))
+if ( ! class_exists('CI_Xmlrpc', FALSE))
{
show_error('You must load the Xmlrpc class before loading the Xmlrpcs class in order to create a server.');
}