From: hickert Date: Mon, 13 Aug 2007 12:58:03 +0000 (+0000) Subject: Set missing values instead of using error_reporting(0) X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=9eacf08e9378e1533f50bedfe17e3466e1ecfb9a;p=gosa.git Set missing values instead of using error_reporting(0) git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@7050 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/include/accept-to-gettext.inc b/include/accept-to-gettext.inc index 6bf1950e6..a108cc21c 100644 --- a/include/accept-to-gettext.inc +++ b/include/accept-to-gettext.inc @@ -86,7 +86,6 @@ function find_match($curlscore,$curcscore,$curgtlang,$langval,$charval, function al2gt($gettextlangs, $mime) { - error_reporting(0); /* Try to use users primary language */ $ui= get_userinfo(); @@ -158,6 +157,18 @@ function al2gt($gettextlangs, $mime) $gtcs=strtoupper($tmp2[1]); $noct=@preg_split("/-/",$allang); + if(!isset($alscores["*"])){ + $alscores["*"] = ""; + } + + if(!isset($alscores[$allang])){ + $alscores[$allang] = ""; + } + + if(!isset($alscores[$noct[0]])){ + $alscores[$noct[0]] = ""; + } + $testvals=array( array($alscores[$allang], $acscores[$gtcs]), array($alscores[$noct[0]], $acscores[$gtcs]), @@ -190,7 +201,6 @@ function al2gt($gettextlangs, $mime) header("Content-Language: $lang"); header("Content-Type: $mime; charset=$charset"); - error_reporting(E_ALL); return $curgtlang; }