diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-10-17 09:52:49 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-10-17 09:52:49 +0200 |
commit | 8a7078b65dc387c8d74f963b80a7559bd094458a (patch) | |
tree | 5ee8dd8ec54379ff58778a6100457645c534bf53 | |
parent | 4525022caf352bf0dee82e8166db5025064f552d (diff) |
Fix issue #1897
-rw-r--r-- | system/libraries/Email.php | 16 | ||||
-rw-r--r-- | user_guide_src/source/changelog.rst | 1 |
2 files changed, 7 insertions, 10 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 08057f2f7..5b17edf9b 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -292,16 +292,7 @@ class CI_Email { $this->set_header('To', implode(', ', $to)); } - switch ($this->_get_protocol()) - { - case 'smtp': - $this->_recipients = $to; - break; - case 'sendmail': - case 'mail': - $this->_recipients = implode(', ', $to); - break; - } + $this->_recipients = $to; return $this; } @@ -1408,6 +1399,11 @@ class CI_Email { */ protected function _send_with_mail() { + if (is_array($this->_recipients)) + { + $this->_recipients = implode(', ', $this->_recipients); + } + if ($this->_safe_mode === TRUE) { return mail($this->_recipients, $this->_subject, $this->_finalbody, $this->_header_str); diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst index 811aa8faf..cbd7c83f5 100644 --- a/user_guide_src/source/changelog.rst +++ b/user_guide_src/source/changelog.rst @@ -363,6 +363,7 @@ Bug fixes for 3.0 - Fixed a bug (#1709) - :doc:`Email <libraries/email>` headers were broken when using long email subjects and \r\n as CRLF. - Fixed a bug where ``MB_ENABLED`` was only declared if ``UTF8_ENABLED`` was set to TRUE. - Fixed a bug where the :doc:`Session Library <libraries/sessions>` accepted cookies with *last_activity* values being in the future. +- Fixed a bug (#1897) - :doc:`Email Library <library/email>` triggered PHP E_WARNING errors when *mail* protocol used and ``to()`` is never called. Version 2.1.3 ============= |