From: Martin Jansen Date: Thu, 7 Feb 2002 11:15:54 +0000 (+0000) Subject: * Partially fix bug #15423. X-Git-Tag: php-4.2.0RC1~401 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e9b1634c68dc70bbc6480fddb303d8807a943d2;p=php * Partially fix bug #15423. --- diff --git a/pear/HTTP.php b/pear/HTTP.php index b03a1e446b..de568f239c 100644 --- a/pear/HTTP.php +++ b/pear/HTTP.php @@ -107,7 +107,8 @@ class HTTP { /* Check for a valid language code in the top-level domain of * the client's host address. */ - if (ereg("\.[^\.]+$", $HTTP_SERVER_VARS['REMOTE_HOST'], $arr)) { + if (isset($HTTP_SERVER_VARS['REMOTE_HOST']) && + ereg("\.[^\.]+$", $HTTP_SERVER_VARS['REMOTE_HOST'], $arr)) { $lang = strtolower($arr[1]); if (!empty($supported[$lang])) { return $lang;