summaryrefslogtreecommitdiffstats
path: root/system/libraries/Email.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2009-04-29 21:13:56 +0200
committerDerek Jones <derek.jones@ellislab.com>2009-04-29 21:13:56 +0200
commit4cefaa43c8ce1b2161ad0fb05add2e5a2d1bf328 (patch)
treeaaad453b110b40c4e7be14815c8dc16533ccfce9 /system/libraries/Email.php
parentfc395a1046441cb584cbcfe42651dacece7eca3e (diff)
added check for FALSE and NULL for servers who have popen listed in php.ini's disable_functions. $fp cannot be trusted on those retarded servers
Diffstat (limited to 'system/libraries/Email.php')
-rw-r--r--system/libraries/Email.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/system/libraries/Email.php b/system/libraries/Email.php
index a4d3c0971..585815934 100644
--- a/system/libraries/Email.php
+++ b/system/libraries/Email.php
@@ -1539,6 +1539,12 @@ class CI_Email {
{
$fp = @popen($this->mailpath . " -oi -f ".$this->clean_email($this->_headers['From'])." -t", 'w');
+ if ($fp === FALSE OR $fp === NULL)
+ {
+ // server probably has popen disabled, so nothing we can do to get a verbose error.
+ return FALSE;
+ }
+
fputs($fp, $this->_header_str);
fputs($fp, $this->_finalbody);