diff options
author | Petr Heralecky <petr@heralecky.cz> | 2014-01-10 16:54:51 +0100 |
---|---|---|
committer | Petr Heralecky <petr@heralecky.cz> | 2014-01-10 16:54:51 +0100 |
commit | 1dbdf72c555d0ea4d7c526e56e79472331eedc2a (patch) | |
tree | 49d016683978a0b3b9d399094deab4aedaf897c1 /system | |
parent | 63f07cbd62ba885f003995dc7ad74bbdb28942c9 (diff) |
condition repair and comments
Diffstat (limited to 'system')
-rw-r--r-- | system/libraries/Email.php | 6 |
1 files changed, 3 insertions, 3 deletions
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); |