E_ALL fix when using proxy's with HTTP_VIA and no HTTP_X_FORWARDED_FOR
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 24 Dec 2002 11:23:21 +0000 (11:23 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Tue, 24 Dec 2002 11:23:21 +0000 (11:23 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@4310 7612ce4b-ef26-0410-bec9-ea0150e637f0

class/deliver/Deliver.class.php

index 4eeed986446421b3346ca6e828ac9f9b28ad325c..5cd5eb11cc003320590503eef4ef0f323341d167 100644 (file)
@@ -241,7 +241,7 @@ class Deliver {
        global $version, $username;
        $rn = "\r\n";
        /* This creates an RFC 822 date */
-       $date = date("D, j M Y H:i:s ", mktime()) . $this->timezone();
+       $date = date('D, j M Y H:i:s ', mktime()) . $this->timezone();
        /* Create a message-id */
        $message_id = '<' . $REMOTE_PORT . '.' . $REMOTE_ADDR . '.';
        $message_id .= time() . '.squirrel@' . $SERVER_NAME .'>';
@@ -252,7 +252,7 @@ class Deliver {
            $received_from = $REMOTE_ADDR;
        }
        if (isset($HTTP_VIA) || isset ($HTTP_X_FORWARDED_FOR)) {
-           if ($HTTP_X_FORWARDED_FOR == '') {
+           if (!isset($HTTP_X_FORWARDED_FOR) || $HTTP_X_FORWARDED_FOR == '') {
                $HTTP_X_FORWARDED_FOR = 'unknown';
            }
            $received_from .= " (proxying for $HTTP_X_FORWARDED_FOR)";