From 500560015dcbdf24a5793edf7d4dda91d7824fa4 Mon Sep 17 00:00:00 2001 From: hickert Date: Thu, 11 Oct 2007 09:32:49 +0000 Subject: [PATCH] Fixed warnings if ACCEPT_LANGUAGE headers attribute wan't set git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7504 594d385d-05f5-0310-b6e9-bd551577e9d8 --- include/accept-to-gettext.inc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/accept-to-gettext.inc b/include/accept-to-gettext.inc index 52647c660..289cae435 100644 --- a/include/accept-to-gettext.inc +++ b/include/accept-to-gettext.inc @@ -86,6 +86,10 @@ function find_match($curlscore,$curcscore,$curgtlang,$langval,$charval, function al2gt($gettextlangs, $mime) { + /* Check if ACCEPT_LANGUAGE isset */ + if(!isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])){ + $_SERVER["HTTP_ACCEPT_LANGUAGE"] = ""; + } /* default to "everything is acceptable", as RFC2616 specifies */ $acceptLang=(($_SERVER["HTTP_ACCEPT_LANGUAGE"] == '') ? '*' : -- 2.30.2