From bc4ac992d1d609c559884e5164b2c51fb0c1fc89 Mon Sep 17 00:00:00 2001 From: trit Date: Wed, 23 Nov 2011 07:19:41 -0500 Subject: Changed filepath back to filename --- system/libraries/Email.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 6be294377..f2670f961 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -1151,19 +1151,19 @@ class CI_Email{ for ($i=0; $i < count($this->_attach_name); $i++) { - $filepath = $this->_attach_name[$i][0]; + $filename = $this->_attach_name[$i][0]; $basename = $this->_attach_name[$i][1]; if( ! $basename) { - $basename = basename($filepath); + $basename = basename($filename); } $ctype = $this->_attach_type[$i]; - if ( ! file_exists($filepath)) + if ( ! file_exists($filename)) { - $this->_set_error_message('lang:email_attachment_missing', $filepath); + $this->_set_error_message('lang:email_attachment_missing', $filename); return FALSE; } @@ -1174,11 +1174,11 @@ class CI_Email{ $h .= "Content-Transfer-Encoding: base64".$this->newline; $attachment[$z++] = $h; - $file = filesize($filepath) +1; + $file = filesize($filename) +1; - if ( ! $fp = fopen($filepath, FOPEN_READ)) + if ( ! $fp = fopen($filename, FOPEN_READ)) { - $this->_set_error_message('lang:email_attachment_unreadable', $filepath); + $this->_set_error_message('lang:email_attachment_unreadable', $filename); return FALSE; } -- cgit v1.2.3-24-g4f1b