diff options
author | Wytze van der Raay <wytze@cacert.org> | 2013-04-28 15:34:37 +0200 |
---|---|---|
committer | Benny Baumann <BenBE@geshi.org> | 2013-04-28 15:34:37 +0200 |
commit | 473373dc3708a0f14a0eb569a9f2b07c3e14aaec (patch) | |
tree | 27824f8c627269ad9a493ce7c81b1f3ab6c72def /includes/mysql.php.sample | |
parent | 55a75d23ce0bb2d63ce05f22725f637d2ed35d62 (diff) | |
download | cacert-devel-473373dc3708a0f14a0eb569a9f2b07c3e14aaec.tar.gz cacert-devel-473373dc3708a0f14a0eb569a9f2b07c3e14aaec.tar.xz cacert-devel-473373dc3708a0f14a0eb569a9f2b07c3e14aaec.zip |
bug 1171: Avoid warning if no remote IP is available (e.g. inside a cron script)bug-1171
Diffstat (limited to 'includes/mysql.php.sample')
-rw-r--r-- | includes/mysql.php.sample | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/includes/mysql.php.sample b/includes/mysql.php.sample index eb86401..10185fc 100644 --- a/includes/mysql.php.sample +++ b/includes/mysql.php.sample @@ -64,7 +64,8 @@ fputs($smtp, "DATA\r\n"); $InputBuffer = fgets($smtp, 1024); fputs($smtp, "X-Mailer: CAcert.org Website\r\n"); - fputs($smtp, "X-OriginatingIP: ".$_SERVER["REMOTE_ADDR"]."\r\n"); + if (array_key_exists("REMOTE_ADDR", $_SERVER)) + fputs($smtp, "X-OriginatingIP: ".$_SERVER["REMOTE_ADDR"]."\r\n"); fputs($smtp, "Sender: $errorsto\r\n"); fputs($smtp, "Errors-To: $errorsto\r\n"); if($replyto != "") |