From 1dbdf72c555d0ea4d7c526e56e79472331eedc2a Mon Sep 17 00:00:00 2001 From: Petr Heralecky Date: Fri, 10 Jan 2014 16:54:51 +0100 Subject: condition repair and comments --- system/libraries/Email.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'system/libraries/Email.php') diff --git a/system/libraries/Email.php b/system/libraries/Email.php index 37a628259..7e80ffbca 100644 --- a/system/libraries/Email.php +++ b/system/libraries/Email.php @@ -710,7 +710,7 @@ class CI_Email { /** * Assign file attachments * - * @param string $file can be path, url or buffered content + * @param string $file Can be local path, URL or buffered content * @param string $disposition = 'attachment' * @param string $newname = NULL * @param string $mime = '' @@ -720,7 +720,7 @@ class CI_Email { { if ($mime === '') { - if (strpos($file,'http://')!==0 && ! file_exists($file) ) + if (strpos($file, '://') === FALSE && ! file_exists($file)) { $this->_set_error_message('lang:email_attachment_missing', $file); return FALSE; @@ -731,7 +731,7 @@ class CI_Email { $this->_set_error_message('lang:email_attachment_unreadable', $file); return FALSE; } - + $file_content = stream_get_contents($fp); $mime = $this->_mime_types(pathinfo($file, PATHINFO_EXTENSION)); fclose($fp); -- cgit v1.2.3-24-g4f1b