summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-04-19 03:23:22 +0200
committerAndrey Andreev <narf@devilix.net>2013-04-19 03:23:22 +0200
commitabc369ce168ceb4beb1483e8aaccc9fd7af5c999 (patch)
tree54e211b023c5f222493b268a1b9b348cd9e698a2
parentb0639fa1cd0a06d9350767be3d620276e587e6ea (diff)
parent83c6efec0a2be84d6ca2c5264b22e4cc26934933 (diff)
Merge pull request #2413 from buhay/develop
Correction for issue #2388.
-rw-r--r--system/libraries/Email.php16
-rw-r--r--user_guide_src/source/changelog.rst1
2 files changed, 13 insertions, 4 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index a745d331d..10253c796 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1236,7 +1236,7 @@ class CI_Email {
/**
* Build Final Body and attachments
*
- * @return void
+ * @return bool
*/
protected function _build_message()
{
@@ -1401,7 +1401,7 @@ class CI_Email {
$body .= implode($this->newline, $attachment).$this->newline.'--'.$this->_atc_boundary.'--';
$this->_finalbody = ($this->_get_protocol() === 'mail') ? $body : $hdr.$body;
- return;
+ return TRUE;
}
// --------------------------------------------------------------------
@@ -1606,7 +1606,11 @@ class CI_Email {
return $result;
}
- $this->_build_message();
+ if ($this->_build_message() === FALSE)
+ {
+ return FALSE;
+ }
+
$result = $this->_spool_email();
if ($result && $auto_clear)
@@ -1665,7 +1669,11 @@ class CI_Email {
$this->_bcc_array = $bcc;
}
- $this->_build_message();
+ if ($this->_build_message() === FALSE)
+ {
+ return FALSE;
+ }
+
$this->_spool_email();
}
}
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index 742dacbae..ff7524b2a 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -497,6 +497,7 @@ Bug fixes for 3.0
- Fixed a bug (#78) - :doc:`Cart Library <libraries/cart>` didn't allow non-English letters in product names.
- Fixed a bug (#77) - :doc:`Database Class <database/index>` didn't properly handle the transaction "test mode" flag.
- Fixed a bug (#2380) - :doc:`URI Routing <general/routing>` method ``fetch_method()`` returned 'index' if the requested method name matches its controller name.
+- Fixed a bug (#2388) - :doc:`Email library <libraries/email>` Updated the method ``_build_message()`` to return a boolean value. Now it doesn't send an email if there is an error attaching a file to the email.
Version 2.1.3