diff --git a/index.php b/index.php index 0bca59d..6a95112 100644 --- a/index.php +++ b/index.php @@ -63,8 +63,8 @@ $ical->initUrl($ICAL_URL, $acceptLanguage = 'de'); $events = $ical->eventsFromInterval('2 week'); $first_event = $events[0]; $events = array_slice($events, 1); -$locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']); -if ($locale !== null){ +if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])){ + $locale = locale_accept_from_http($_SERVER['HTTP_ACCEPT_LANGUAGE']); setlocale(LC_TIME, $locale); } } @@ -178,6 +178,27 @@ $v = file_get_contents($VISITORS_FILE);