Switch disposition set to ternary operation
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index 3c679ce..631b62e 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -420,14 +420,9 @@
*/
public function attach($filename, $disposition = '', $newname = NULL)
{
- if(empty($disposition))
- {
- $disposition = 'attachment';
- }
-
$this->_attach_name[] = array($filename, $newname);
$this->_attach_type[] = $this->_mime_types(pathinfo($filename, PATHINFO_EXTENSION));
- $this->_attach_disp[] = $disposition; // Can also be 'inline' Not sure if it matters
+ $this->_attach_disp[] = empty($disposition) ? 'attachment' : $disposition; // Can also be 'inline' Not sure if it matters
return $this;
}