diff options
author | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-10 16:06:37 +0200 |
---|---|---|
committer | Phil Sturgeon <email@philsturgeon.co.uk> | 2011-08-10 16:06:37 +0200 |
commit | 0aaf42b45f7b56bb1d5e99e17ac3045348064cdd (patch) | |
tree | 8a3ecc8d3c5a559ad3f88d99b3bb6cfae052db5a | |
parent | 77cc0281479b9ccecc9f7bc1386846a1ccf5f94f (diff) |
Fixed a bug where Email library attachments with a . in the name would using invalid MIME-types.
-rw-r--r-- | system/libraries/Email.php | 2 | ||||
-rw-r--r-- | user_guide/changelog.html | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 9b3bc75e1..fb9a75049 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -395,7 +395,7 @@ class CI_Email { public function attach($filename, $disposition = 'attachment') { $this->_attach_name[] = $filename; - $this->_attach_type[] = $this->_mime_types(next(explode('.', basename($filename)))); + $this->_attach_type[] = $this->_mime_types(pathinfo($filename, PATHINFO_EXTENSION)); $this->_attach_disp[] = $disposition; // Can also be 'inline' Not sure if it matters return $this; } diff --git a/user_guide/changelog.html b/user_guide/changelog.html index 0f767b4cc..b39afc43e 100644 --- a/user_guide/changelog.html +++ b/user_guide/changelog.html @@ -108,6 +108,7 @@ Change Log <li class="reactor">Fixed a bug where the method <kbd>$this->cart->total_items()</kbd> from <a href="libraries/cart.html">Cart Library</a> now returns the sum of the quantity of all items in the cart instead of your total count.</li> <li>Fixed a bug where not setting 'null' when adding fields in db_forge for mysql and mysqli drivers would default to NULL instead of NOT NULL as the docs suggest.</li> <li>Fixed a bug where using <kbd>$this->db->select_max()</kdb>, <kbd>$this->db->select_min()</kdb>, etc could throw notices. Thanks to w43l for the patch.</li> + <li>Fixed a bug where <a href="libraries/email.html">Email library</a> attachments with a "." in the name would using invalid MIME-types.</li> </ul> <h2>Version 2.0.2</h2> |