summaryrefslogtreecommitdiffstats
path: root/system/libraries
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-03 03:37:48 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-03 03:37:48 +0100
commitc28e7025f93114afa8c9ab7fb9d65b9c329e2ae6 (patch)
treed39092f36aff1c81db2a644be950437f135d1fd6 /system/libraries
parentbfe6922c7a10701aee56ee9072243cf58d9e96a4 (diff)
parenta19beb0c580ac78c4b75548a046240a85f30cb29 (diff)
Merge upstream branch
Diffstat (limited to 'system/libraries')
-rw-r--r--system/libraries/Email.php7
-rw-r--r--system/libraries/Session.php2
2 files changed, 6 insertions, 3 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index c8a5b41af..8d839d0c9 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1359,6 +1359,7 @@ class CI_Email {
if ( ! $this->$method())
{
$this->_set_error_message('lang:email_send_failure_' . ($this->_get_protocol() === 'mail' ? 'phpmail' : $this->_get_protocol()));
+ return FALSE;
}
$this->_set_error_message('lang:email_sent', $this->_get_protocol());
@@ -1433,8 +1434,10 @@ class CI_Email {
return FALSE;
}
- $this->_smtp_connect();
- $this->_smtp_authenticate();
+ if ( ! $this->_smtp_connect() OR ! $this->_smtp_authenticate())
+ {
+ return FALSE;
+ }
$this->_send_command('from', $this->clean_email($this->_headers['From']));
diff --git a/system/libraries/Session.php b/system/libraries/Session.php
index 66b39a6a2..dd50a91e1 100644
--- a/system/libraries/Session.php
+++ b/system/libraries/Session.php
@@ -219,7 +219,7 @@ class CI_Session {
$this->CI->db->where('user_agent', $session['user_agent']);
}
- $query = $this->CI->db->get($this->sess_table_name);
+ $query = $this->CI->db->limit(1)->get($this->sess_table_name);
// No result? Kill it!
if ($query->num_rows() === 0)