From 9eacf08e9378e1533f50bedfe17e3466e1ecfb9a Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 13 Aug 2007 12:58:03 +0000 Subject: [PATCH] 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 --- include/accept-to-gettext.inc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) 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; } -- 2.30.2