summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pear/HTTP.php3
1 files changed, 2 insertions, 1 deletions
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;