Switched order of arguments to maintain compatibility
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 8f2ca62..d81fd44 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -418,7 +418,7 @@
* @param string
* @return void
*/
- public function attach($filename, $newname=NULL, $disposition = 'attachment')
+ public function attach($filename, $disposition = 'attachment', $newname=NULL)
{
$this->_attach_name[] = array($filename, $newname);
$this->_attach_type[] = $this->_mime_types(pathinfo($filename, PATHINFO_EXTENSION));