--- i18n.module.orig	2005-10-07 22:08:04.000000000 +0200
+++ i18n.module	2005-11-24 12:29:36.000000000 +0100
@@ -165,7 +165,8 @@
 // Get language from browser settings, but only if it is in the $i18n_languages array
 function i18n_get_browser_lang() {
   $languages = i18n_supported_languages();
-  $accept=explode(',',array_shift( explode(";",$_SERVER["HTTP_ACCEPT_LANGUAGE"])));
+  $exploded_server = explode(";",$_SERVER["HTTP_ACCEPT_LANGUAGE"]);
+  $accept=explode(',',array_shift($exploded_server));
   foreach ($accept as $lang) {
     $lang=substr($lang,0,2);
     if ( !empty($lang) && array_key_exists($lang,$languages)) {
@@ -181,7 +182,8 @@
  * @param $trim true to remove language code from $path
  */
 function i18n_get_lang_prefix(&$path, $trim = false) {
-  $maybelang = array_shift(explode('/',$path));
+  $exploded_path = explode('/',$path);
+  $maybelang = array_shift($exploded_path);
   $languages = i18n_supported_languages();
   if(array_key_exists($maybelang, $languages)){
     if($trim) {
